Top Results with rest api and aq filters?
Using rest api (sitecore data if that matters) it seems that TopResults does not respect filters in the aq: parameter which would exclude the topresult.
Example, q: "tom". Some document A is configured as a TopResult for "tom". Works as expected.
But say document A has @myfield=="myval". If I run q: "tom" aq: NOT @myfield=="myval", document A is still returned.
Is this a bug?
Is there some way to have aq: respected? Or at least to know that but for Topresult the document would have been omitted from results?
Coveo Enterprise Search 7 platform top results never respect query filters, not even the ones in the user query. If the user query contains a term that match a top result configuration, the top result is added to the query result set in the first position. Whatever the endpoint you would query, top results will behave the same way.
An alternative to top results, if you have only a few, could be to generate your own query ranking expressions (QRE) and add them to all the queries. That way, the query filters would also be applied as the QRE's job would be only to boost the matching results but wouldn't add the results to the result set if not returned by the index.
I hope this helps,