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?
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.
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.
I would suggest yo to run query against page types (typeCri1 || typeCri2 || typeCri3) and than filer results by text criteria locally on collection.