excluding orphans using folding feature
We are using folding feature to display questions and answers. Questions are tagged with certain topics and the topics are displayed as a facet on the search results page. One of the requirement is to exclude certain tags. We excluded all the questions that were tagged with excluded tags by creating a custom field "crawlingpage=false (using custom script) and then applied the filter "NOT crawlingpage=false" during the query execution. Everything is good except the replies to these excluded questions are displaying on the search result pages. Is there a way we can ignore all the orphan replies from UI?
Hi, You can solve your issue using nested queries.
Assuming your folding field is named @questionid, you can change your filter to this:
NOT [[@questionid] @crawlingpage=false]
This basically means, return all the @questionid values for which @crawlingpage is false, and then don't return any document having this value, question or answer.
This will require your folding field to be a facet, it is a requirement for nested queries.