You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should return relevant explain output here instead of returning null for TermAutomatonQuery. This would be helpful for users running document explain on synonym queries leveraging TermAutomatonQuery. Otherwise, certain queries that can nest other queries could throw a NullPointerException if their weight's explain() calls TermAutomatonQuery#explain().
For example, if a BooleanQuery nests a TermAutomatonQuery, then BooleanWeight throws an NPE here when running explain():
@kashkambath this looks good. Thanks for opening the issue. Do you feel like #12208 addresses your concerns? It will surely be reviewed soon. There's obviously more we can do, but the first step is to get the functionality there, and then we can build improvements upon it. There's a lot to do in many areas in perpituity.
Description
Hi! This is my first time posting a GitHub issue for Apache Lucene. Please let me know if you need anything further.
lucene/lucene/sandbox/src/java/org/apache/lucene/sandbox/search/TermAutomatonQuery.java
Lines 443 to 447 in 569533b
We should return relevant explain output here instead of returning
null
forTermAutomatonQuery
. This would be helpful for users running document explain on synonym queries leveragingTermAutomatonQuery
. Otherwise, certain queries that can nest other queries could throw aNullPointerException
if their weight'sexplain()
callsTermAutomatonQuery#explain()
.For example, if a
BooleanQuery
nests aTermAutomatonQuery
, thenBooleanWeight
throws an NPE here when runningexplain()
:lucene/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java
Line 75 in 569533b
Version and environment details
No response
The text was updated successfully, but these errors were encountered: