You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by John Blythe <jo...@curvolabs.com> on 2017/04/10 12:37:48 UTC

analysis matching, query not

hi all.

i'm experiencing a head scratcher. i've got some queries that aren't
matching despite seeing them do so in the Analysis window. i'm wondering if
it's due to multi-term differences between Analysis and raw queries.

i'm querying something like this: ...fq=manufacturer:("VENDOR:VENDOR US")
OR manufacturer_syn:("VENDOR:VENDOR US")...

The indexed value is: "Vendor"

the output of field 1 in the Analysis tab would be:
index: vendor_coolmed | coolmed | vendor
query: vendor_vendor_coolmed | vendor | vendor

the other field (and a couple other correlates of it, actually) have
similar situations where I see a clear match (as well as get the
confirmation of it when switching to the old UI and seeing the
highlighting) yet get no results in my actual query.

is it due to the way quotes operate in a query v. how the Analysis page
parses out what is passed in? something else i should check for that is a
recurring discrepancy between the two that cause these sorts of situations?

one further note. when i get the query debugging enabled I can see this in
the output:
"filter_queries":["manufacturer_syn_both:\"Vendor:Vendor US\"",
"manufacturer_split_syn:(\"Vendor:Vendor
US\")"], "parsed_filter_queries":["MultiPhraseQuery(manufacturer_syn_both:\"(vendor_vendor_us
vendor) vendor\")", "PhraseQuery(manufacturer_split_syn:\"vendor vendor\")"]
,...

It looks as if the parsed query is wrapped in quotes even after having been
parsed, so while the correct tokens, i.e. "vendor", are present to match
against the indexed value, the fact that the entire parsed derivative of
the initial query is sent to match (if that's indeed what's happening)
won't actually get any hits. Yet if I remove the quotes, then the parsing
doesn't get to a point of having any worthwhile/matching tokens to begin
with.

would very much appreciate any thoughts or direction as to what i'm missing
here.

best,