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

Jehyun Lee commented on LUCENE-9430:
------------------------------------

Yes, fix the explain() can be make detailed..

But I think additional boolean is more reasonable. Because of...
 # If not add boolean, just fix the explain(), existing users may be confused. 
The explain() result will be changed, so user confuse to analyze the query 
result. But in my patch, existing query is not changed(default of the boolean 
is false, so operate of the explain() is same)
 # Setting the state through the boolean member makes the state of the object 
and action of the object more clear.
 # Between the debug version( that need to analyze the query) and the release 
version, it is easy to convert just like below example
{code:java}
Query q = new ConstantScoreQuery(query, isDebugging());
{code}
So, I think additional boolean and generate explanation for ConstantScoreQuery 
is more reasonable.

> Explainable ConstantScoreQuery
> ------------------------------
>
>                 Key: LUCENE-9430
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9430
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Jehyun Lee
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Developer cannot check the result of detailed explain with ConstantScoreQuery.
> If the developer want to check it, then must be change the query.
>  
> The result is the same as ConstantScoreQuery,
> but if you can check the detailed explain, it will help in development and 
> debug.
>  
> So, I make the Pull Request for this :)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to