Forum Discussion
Result search query for managed properties
Mackdewack first off you might end up with loose OR's in that statement when searchboxquery is empty. What you are looking for is adding () around the variable as I blogged about at https://www.techmikael.com/2019/08/search-nugget-grouping-property.html
Also, adding a *, will only wildcard enable the last term you input. An remember that adding * to a term, will remove it from getting rank points. Only individual terms are ranked, so relevance might drop when using wildcards.
Mikael Svenson i'm almost there, i hope ![]()
This is my input query:
ContentType:xxx (Title:{searchboxquery}) OR (RefinableString1:{searchboxquery})
With the query i can search on titles and on the refinablestring1. When i start with the refinablestring after my results i can add extra words for the the title.
ContentType:xxx (Title:Microsoft 777) OR (RefinableString31:Microsoft 777) -ContentClass=urn:content-class:SPSPeople
Refinablestring = Microsoft
Title 777
When i use Microsoft 777 i see my result but when i use 777 Microsoft i got no results, doenst make any sense to me. Is there an explanation for?
- Mikael SvensonNov 28, 2019Iron ContributorYou need to read better.
(RefinableString1:{searchboxquery}) should be RefinableString1:({searchboxquery})- MackdewackNov 28, 2019Copper Contributor
Uhhh if i try it with the (), i can't combine the words together. Without the () i can combine it but i have to start with the string and then the title.
ContentType:xxx (Title:Microsoft 777) OR RefinableString31:Microsoft 777 -ContentClass=urn:content-class:SPSPeople- Mikael SvensonNov 28, 2019Iron ContributorI think I understand now. You want to split the terms into being queried by different properties. Not doable without adding code to pick up and modify. If this is classic, it's doable/hackable, but in general no. And how do you know which terms should go where?