Gravatar for

Question by rloeb, Oct 18, 2016 12:32 AM

Is aq treated the same as if it were q?

I'm seeing some bizarre behavior (using folding feature if that matters), where aq filters are sometimes failing unless they are placed along with q

I have a single document that:

  1. does not have the word "repair" in it but does contain words "service" and "offering"
  2. satisfies this filter: @ftecz32xworkz32xplans45666=(d4582efd1c7642388975eac48dd4184a)
  3. also satisfies @syssource==("Coveo_web_index XXXXXX") (just don't want to post full index name)

For example:

1) suppose I have:

aq: @ftecz32xworkz32xplans45666=(d4582efd1c7642388975eac48dd4184a)
@syssource==("Coveo_web_index XXXXXX")

this returns me 1 record as expected, and I see it comes from Coveo_web

2) but,

q: "repair"
aq: @ftecz32xworkz32xplans45666=(d4582efd1c7642388975eac48dd4184a)
@syssource==("Coveo_web_index XXXXXX")

I get 2 records, both of which come from Coveo_master ????

3) then, if I do:

q: repair @syssource==("Coveo_web_index XXXXXX") 
aq: @ftecz32xworkz32xplans45666=(d4582efd1c7642388975eac48dd4184a)

I get 0 results (which is actually what I expected).


q: service OR offering OR repair
aq:@syssource==("Coveo_web_index XXXXXX")     

I get 1 result

So why is example #2 behaving this way? I'd rather not have to use #2 as a workaround…am I missing something? Thanks

1 Reply
Gravatar for

Answer by Martin Laporte, Oct 18, 2016 3:19 AM

q and aq are combined together using an AND operator, so it's indeed weird that #2 yields two results. One thing that might produce surprising results such as this is if "partial matching" is enabled. When on, it applies some special processing on q, and with the proper parameters it can cause documents to match without containing the keyword.

Since partial match is automatically disabled if you include field expressions in q, that would explain why #3 returns 0 results.

Otherwise, if you load the search page with debug=1 in the query string and then check the REST requests in the Network tab, you'll be able to see the final query expressions that are evaluated at the index level; maybe this would give you a hint of what's amiss…

Gravatar for

Comment by rloeb, Oct 20, 2016 9:50 PM

After much todo we figured out it was Top Results that were coming back. We were a little surprised that even the @sysindex filter is ignored for top results.

Ask a question