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
the ContextIndexSearch will start the timer for the query and will start noting the rewrite() time for all clauses in the clauses for the complete query tree.
But if we try to use indexSearcher.rewrite(delegateQuery) within rewrite of any of the query, it will try to initialize the profiler and timer again and will result in the assertion error here -
» java.lang.AssertionError
» at org.opensearch.search.profile.query.AbstractQueryProfileTree.startRewriteTime(AbstractQueryProfileTree.java:48)
» at org.opensearch.search.profile.query.QueryProfiler.startRewriteTime(QueryProfiler.java:80)
» at org.opensearch.search.internal.ContextIndexSearcher.rewrite(ContextIndexSearcher.java:192)
» at org.opensearch.index.query.SourceFieldMatchQuery.rewrite(SourceFieldMatchQuery.java:76)
» at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:777)
» at org.opensearch.search.internal.ContextIndexSearcher.rewrite(ContextIndexSearcher.java:196)
» at org.opensearch.search.DefaultSearchContext.preProcess(DefaultSearchContext.java:362)
» at org.opensearch.search.query.QueryPhase.preProcess(QueryPhase.java:127)
» at org.opensearch.search.SearchService.createContext(SearchService.java:1053)
Describe the bug
In query phase, when rewrite is called
OpenSearch/server/src/main/java/org/opensearch/search/query/QueryPhase.java
Line 127 in 5ff50a7
the
ContextIndexSearch
will start the timer for the query and will start noting therewrite()
time for all clauses in the clauses for the complete query tree.But if we try to use
indexSearcher.rewrite(delegateQuery)
within rewrite of any of the query, it will try to initialize the profiler and timer again and will result in the assertion error here -OpenSearch/server/src/main/java/org/opensearch/search/profile/query/AbstractQueryProfileTree.java
Line 48 in 200ad5d
Related component
Search
To Reproduce
run this query on an index with field
message
of typematch_only_text
.Expected behavior
Expected profile output like below and not asserting error -
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: