0

We have SharePoint Pages on O365 with the title of the Page is "Jeffer Steak Seafood". We can search this page by typing "Jeffer Seafood" in the search result page. However, we create a new page and add search result webpart. Then, we change the query to receive the parameter such as {QueryString.keywords}.

When we access this page with parameter keywords=Jeffer, we get the search result. But when we type keywords=Jeffer Seafood, we get no results. It seems that the QueryString is transform to "Jeffer Seafood" which is the exact search.

So how can we create the search result page from the parameter without the exact search function?

Best Regards,

Amornthep C.

  • would you show us your configuration in search result webpart? – Mark L Aug 16 at 9:07
  • Hi Mark, The query is just {QueryString.keywords}. I tested the query and the final query is "Jeffer Seafood". So I assume the double quote is the problem. – Andy Aug 16 at 17:20
  • I tested with SP2016. If you pass the search keyword within URL (i.e. querystring) it seems the sentence input is being handled as "one phrase". However, if I use a search box, input "Jeffer OR Seafood" (upper case OR), it should return as your need. – Mark L Aug 20 at 6:22
  • yes. So I need to add the search box webpart as well. I found this very strange. It should work the same way. – Andy Aug 20 at 12:02
0

According to my research and tests, when you pass the keyword within URL (i.e. querystring) the wording input is being handled as "one phrase". There is no way to break apart the wordings into multiple words.

However, if you input the keyword using a search box (e.g. "Jeffer OR Seafood"), it should return results contains "Jeffer" or "Seafood".

You may also submit your query with Search REST API. Here are samples to get search result from "Jeffer Seafood" and "Jeffer OR Seafood":

http://server/_api/search/query?querytext=%27Jeffer%20Seafood%27

http://server/_api/search/query?querytext=%27Jeffer+OR+Seafood%27

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.