Try our conversational search powered by Generative AI!

How to Group Property Criteria in Criteria Search

Vote:
 

Currently I want to use criteria search to filter content, the filters are page types and keywords. And I want to do something like this:

(typeCri1 || typeCri2 || typeCri3) && (textCri1 || text Cri2)

However it seems that the CriteriaCollection cannot be nested, which make my filter logic to:

typeCri1 || typeCri2 || typeCri3 && textCri1 || text Cri2

Which is completely wrong. So what should I do to achieve the grouping of criteria I need?

#139888
Oct 08, 2015 22:18
Vote:
 

Hi,

I don;t think that it's possible using FindPagesWithCriteria. I would suggest yo to run query against page types (typeCri1 || typeCri2 || typeCri3) and than filer results by text criteria locally on collection.

Or if the thext condition returns less results that page types filters then run query with text filter and do local filtering on page types.

#139918
Oct 09, 2015 15:43
Vote:
 

Thanks Grzegorz,

That's enough for me, just need a confirmation in case there is an easy way out. I think I would switch to full text search, still want to do this cleanly and efficiently.

#139920
Oct 09, 2015 15:48
Vote:
 

I would suggest yo to run query against page types (typeCri1 || typeCri2 || typeCri3) and than filer results by text criteria locally on collection.

#139933
Oct 10, 2015 21:13
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.