[ 
https://issues.apache.org/jira/browse/LUCENE-9640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17286698#comment-17286698
 ] 

Michael Sokolov commented on LUCENE-9640:
-----------------------------------------

Yes, I don't like the mutable Query idea either, but we're struggling to find 
alternatives. Highlighter sounds interesting. 

Here's a problem statement: for a given query, I'd like to be able to specify 
certain subqueries (like all the SHOULD clauses for example, or just pick some 
based on knowledge of how the query was constructed) and once I have a hit, 
find out which of those clauses matched. Then I want to use this information in 
a variety of ways, but at a minimum, log it  or add it to the search response 
for later analysis. One example use case: I am experimenting with adding a new 
source of matches, like a bunch of garbage text I mined from somewhere that an 
oracle tells me is supposed to be relevant to a document, but I'm not sure. 
Then I run an A/B test to see if adding this source of matches is helpful, and 
I want to control this at the query level rather than deploying parallel 
indexes.

> Add TrackingQuery to track matching documents
> ---------------------------------------------
>
>                 Key: LUCENE-9640
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9640
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/search
>            Reporter: Elbek Kamoliddinov
>            Priority: Major
>              Labels: query
>
> Some users benefit having {{TrackingQuery}} functionality. This query would 
> wrap another query and should be able to provide the matched DocIds for the 
> wrapped query after search is run.  For example a user running a boolean 
> query {{A or B}} could wrap query {{A}} into {{TrackingQuery}} and run the 
> boolean query and check if documents that matched the boolean query matches 
> the query {{A}}.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to