Chris M. Hostetter created LUCENE-10571:
-------------------------------------------
Summary: Monitor alternative "TermFilter" Presearcher for sparse
filter fields
Key: LUCENE-10571
URL: https://issues.apache.org/jira/browse/LUCENE-10571
Project: Lucene - Core
Issue Type: Improvement
Components: modules/monitor
Reporter: Chris M. Hostetter
One of the things that surprised me the most when looking into how the
{{TermFilteredPresearcher}} worked was what happens when Queries and/or
Documents do _NOT_ have a value in a configured filter field.
per the javadocs...
{quote}Filtering by additional fields can be configured by passing a set of
field names. Documents that contain values in those fields will only be checked
against \{@link MonitorQuery} instances that have the same fieldname-value
mapping in their metadata.
{quote}
...which is straightforward and useful in the tested example where every
registered Query has {{"language"}} metadata, and every Document has a
{{"language"}} field, but gives unintuitive results when a Query or Document
does *NOT* have a {{"language"}}
A more "intuitive" & useful (in my opinions) implementation would be something
that could be documented as ...
{quote}Filtering by additional fields can be configured by passing a set of
field names. Documents that contain values in those fields will only be checked
against \{@link MonitorQuery} instances
that have the same fieldname-value mapping in their metadata <em>or have no
mapping for that fieldname</em>.
Documents that do not contain values in those fields will only be checked
against \{@link MonitorQuery} instances that also have no mapping for that
fieldname.
{quote}
...ie: instead of being a straight "filter candidate queries by what we find in
the filter fields in the documents" we can instead "derive the queries that are
viable candidates for each document if we were restricting the set of documents
by those values during a "forward search"
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]