0

I have a modern search box and results web part on a page. If I add a wildcard to the default search query, all results display as expected. However, when a search term is entered, the results aren't filtered. On page load, I'd like to see all results from a default query (say, all docs in a library) and then filter those results based on a search term entered.

I've tried formatting the KQL default search syntax using a wildcard "*", but the results don't change when a search keyword is entered. Is there a KQL option to resolve this, or is it not possible?

1
  • What exactly your KQL is? Could you provide example?
    – Mark L
    Sep 29, 2020 at 2:51

1 Answer 1

0

I was able to figure it out - the key is to include the {searchTerms} token in the query template, so something like:

Path: https://xxx.sharepoint.com/sites/xxx/Shared%20Documents {searchTerms}

That then overrides the wild card (or path) in the default search query when a search term is entered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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