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 ?

  • Try reindex this list. Gear>List Settings>Advanced Settings>Reindex List – Marko Tica Jun 9 at 10:02
  • @MarkoTica: I already tried this, several times, on the list and on the web itself. Moreover, the data in the index seems correct. Using Search query tool, I can see the title is correct – Steve B Jun 9 at 14:21

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

| improve this answer | |
  • You test isn't accurate. You are searching is equivalent to (Title:it's) OR (working) which is not correct. It may returns the result but also any other data that match one of the two predicate. I need to retrieve items that have exactly "It's working" in its title – Steve B Jun 9 at 9:28
  • I also tried Title:"it's working". Also get the search result. – Michael Han_MSFT Jun 9 at 9:37
  • 1
    Thanks. I start to think there's something broken in the platform. I never have issue like this. I guess I'll have to open a ticket. Thanks – Steve B Jun 9 at 12:02
  • You could try to test in different site collections. – Michael Han_MSFT Jun 10 at 9:14
  • I tried in two different tenants – Steve B Jun 10 at 13:13

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.


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.