I'm using custom smart search with filters. Now I'm using this code to combine search conditions
var fo="term1 term2"; var filterText = SearchSyntaxHelper.GetFilterCondition(filterFieldName, fo); filterText = SearchSyntaxHelper.GetRequiredCondition(filterText); SearchSyntaxHelper.AddSearchCondition(queryText, filterText);
As a result query text looks like "+(keyword) +_filterFieldName:(term1 term2)". This request will return me all items that contains in index term1 AND term2. But how can I get a filter that will use OR clause? I mean I want to get items that contains in index term1 OR term2
"+(keyword) +_filterFieldName:(term1 term2)"
try Zach's suggestion or +_filterFieldName:(term1 OR term2). Here is a topic on stackoverflow
+_filterFieldName:(term1 OR term2)
You should be able to just add the same filter with an OR. +(_filterfieldName:term1 OR _filterfieldName:term2)
+(_filterfieldName:term1 OR _filterfieldName:term2)
Please, sign in to be able to submit a new answer.