1

what is the proper syntax in case we need to use special characters in search query, for example: I want to perform search that will return all sharepoint sites that use Team site template - that would mean I need to use # in my search query So, I need a hint about using #, -, _ in my search.

Thanks

Update 12.07.2013: SharePoint 2013, SSOM and Search UI.

  • 1
    Which edition of SharePoint? Which query language (KQL, SQL, FQL)? Client or server? – Chris Beckett Jul 11 '13 at 0:23
1

You can use a \ (backward slash) before your special characters in the GUI, for example in the searchbox write STS\#

From code should be the same if you use KQL. If you want to set the search querystring from code you would have to do an encoding by using SPEncode.UrlEncode (MSDN)

A tip is to do some refining in the Search results page and then look at the Query strings that SharePoint has generated to get some ideas of how to filter out different things.

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.