Skip to main content
1 of 3
Anon
  • 805
  • 6
  • 13

Try disabling stemming in your query by adding &enablestemming=false (see documentation).

Per default, SharePoint search will split your search terms based on whitespace characters etc. and will also try to search for word stems of those terms. Disabling that functionality for your query might yield better results for you.

In additional, you should encode your search string by using encodeURIComponent to take account for characters that are invalid for a URL.

var url = encodeURI("/_api/search/query?querytext='" + encodeURIComponent(this.searchstring) + "'&selectproperties='ListID,Path,FileType,SiteName,Title,isDocument,SitePath,SPSoteUrl,SPWebUrl,WebUrl'&enablestemming=false");
Anon
  • 805
  • 6
  • 13