lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beach, Daniel" <>
Subject Querying fields that don't exist in every collection
Date Wed, 18 Oct 2017 19:15:18 GMT
Hello all,

I'm running into an issue where adding a field to the qf changes the parsed query if that
field doesn't exist in the Solr index. Our use case for doing this is that we have multiple
collections and many of our queries leverage aliases to search across several of them simultaneously.
While we have a common group of fields that is shared across schemas, it is often the case
that we need to use collection-specific fields to boost one content type over another.

Here is the query debug output from a query that only searches on existing fields. This is
the intended outcome.


    "rawquerystring":"companies NOT brands*",
    "querystring":"companies NOT brands*",
    "parsedquery":"(+(DisjunctionMaxQuery((Text:company)) -DisjunctionMaxQuery((Text:brands*))))/no_coord",
    "parsedquery_toString":"+((Text:company) -(Text:brands*))",

When a "BOGUS" field name is added to the second query suddenly the query operators aren't
interpreted correctly, and wildcards get dropped.


    "rawquerystring":"companies NOT brands*",
    "querystring":"companies NOT brands*",
    "parsedquery":"(+(DisjunctionMaxQuery((Text:company)) DisjunctionMaxQuery((Text:not))
    "parsedquery_toString":"+((Text:company) (Text:not) (Text:brand))",

These results are from Solr 6.5.0 and 5.5, querying against a single collection endpoint.
Is this Solr's expected functionality? Hopefully I'm just blanking on something simple here.

Daniel Beach


The information contained in this message is intended only for the recipient, and may be a
confidential attorney-client communication or may otherwise be privileged and confidential
and protected from disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the intended recipient,
please be aware that any dissemination or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately notify us by replying
to the message and deleting it from your computer. S&P Global Inc. reserves the right,
subject to applicable local law, to monitor, review and process the content of any electronic
message or information sent to or from S&P Global Inc. e-mail addresses without informing
the sender or recipient of the message. By sending electronic message or information to S&P
Global Inc. e-mail addresses you, as the sender, are consenting to S&P Global Inc. processing
any of your personal data therein.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message