Question

I have a simple generic list with no customization (only the title column is present).

I put some values in the list, including one as It's working.

When I search this value, I get no result. I'm convinced this is due to the single quote 'in the title.

Here's searches I tried, and their results :

  • "it's working" ==> no result
  • "it's*" ==> no result
  • it's* ==> result found
  • it's working ==> no result
  • "it*" ==> result found
  • Title:"it's working" ==> no result
  • Title:"it's*" ==> no result
  • Title:it's* ==> no result
  • Title:"it*" ==> result found
  • Title:"it''s working" ==> no result
  • Title:"it\'s working" ==> no result
  • Title:"it%27's working" ==> no result
  • Title:"it's working"` ==> no result
  • Title="it's working" ==> no result
  • Title:string("it's working") ==> no result

I don't understand these results. Quotes seems to cause trouble in finding the value, but quotes are required to search for the whole value.

My context is a modern sharepoint search page.

I also noticed the same behavior using the search query tool. When I put the candidate search string in the tool, it fail with an error 400:

/_api/search/query?querytext='"it's+working"'&rowlimit=50&clienttype='ContentSearchRegular' ==> give error : query string is missing or invalid.

I also tried using the legacy osssearchresults.aspx page. No more progress.

What's puzzling me is that the same test ("it's working") works as expected on a local SP2013 environment..

How can I search for item with the Title equals to it's working ?

What did I missed ?

Was it helpful?

Solution 2

I finaly was able to perform query against data with single quote.

I created a new managed property, where I check "Exact matching" option.

Querying against this managed property worked with my single quote.

Ex:

MyBrandNewManagedProp:"It's working"

As a side note, I contacted the Microsoft Support. The only response I got is that's "by design" and it won't be solved.

OTHER TIPS

Per my test, I could search items with ' in title without any issues on my end. Below are my test results:

enter image description here

enter image description here

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top