[
https://issues.apache.org/jira/browse/SOLR-18156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris M. Hostetter updated SOLR-18156:
--------------------------------------
Description:
Solr 10.0.0's {{SolrIndexSearcher}} implements {{QueryLimits}} in a way that
constructs an anonymous {{IndexSearcher}} for executing each entire {{Query}}
object - this causes several problems:
# Solr specific "join" and "graph" queries trigger ClassCastExceptions because
they expect a {{SolrIndexSearcher}} to be used during {{Query.createWeight()}}
** This also affects "join domains" in JSON Faceting
** the same type of assumptions existing LTR feature logic
# The anonymous {{IndexSearcher}} does not know about the configured
{{statsCache}} for the original {{SolrIndexSearcher}} so only local stats are
used
# The anonymous {{IndexSearcher}} does not know about the configured
{{similarityFactory}} for the original {{SolrIndexSearcher}} so the lucene
default BM25 similarity is used
# several of Solr's custom query impls have cache optimizations that kick in
when they detect a {{SolrIndexSearcher}} which are not used
{panel:title=Original Jira Descrption}
Beginning with Solr 10.0.0, attempting to use any of the {{join}} QParsers in
conjunction with QueryLimits results in a ClassCastException.
This is because {{JoinQuery.createWeight(...)}} expects it will only ever be
called with a {{{}SolrIndexSearcher{}}}, but
{{SolrIndexSearcher.seach(Query,Collector)}} is overriddent to create an
anonymous {{IndexSearcher}} to use when QueryLimits are enabled.
This was not a problem in Solr 9.x, because back then the logic for creating an
anonymous {{IndexSearcher}} was inside the overridden
{{SolrIndexSearcher.seach(List<LeafReaderContext>,Weight,Collector)}} (after
the {{Weight}} instance had already been created using the original
{{{}SolrIndexSearcher{}}})
{panel}
was:
Beginning with Solr 10.0.0, attempting to use any of the {{join}} QParsers in
conjunction with QueryLimits results in a ClassCastException.
This is because {{JoinQuery.createWeight(...)}} expects it will only ever be
called with a {{{}SolrIndexSearcher{}}}, but
{{SolrIndexSearcher.seach(Query,Collector)}} is overriddent to create an
anonymous {{IndexSearcher}} to use when QueryLimits are enabled.
This was not a problem in Solr 9.x, because back then the logic for creating an
anonymous {{IndexSearcher}} was inside the overridden
{{SolrIndexSearcher.seach(List<LeafReaderContext>,Weight,Collector)}} (after
the {{Weight}} instance had already been created using the original
{{{}SolrIndexSearcher{}}})
> Various problems using QueryLimits (aka: timeAllowed) in Solr 10.0.0 due to
> anonymous IndexSearcher
> ---------------------------------------------------------------------------------------------------
>
> Key: SOLR-18156
> URL: https://issues.apache.org/jira/browse/SOLR-18156
> Project: Solr
> Issue Type: Bug
> Affects Versions: 10.0
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Fix For: main(11.0), 10.1, 10.0.1
>
> Attachments: SOLR-18156.patch
>
>
>
> Solr 10.0.0's {{SolrIndexSearcher}} implements {{QueryLimits}} in a way that
> constructs an anonymous {{IndexSearcher}} for executing each entire {{Query}}
> object - this causes several problems:
> # Solr specific "join" and "graph" queries trigger ClassCastExceptions
> because they expect a {{SolrIndexSearcher}} to be used during
> {{Query.createWeight()}}
> ** This also affects "join domains" in JSON Faceting
> ** the same type of assumptions existing LTR feature logic
> # The anonymous {{IndexSearcher}} does not know about the configured
> {{statsCache}} for the original {{SolrIndexSearcher}} so only local stats are
> used
> # The anonymous {{IndexSearcher}} does not know about the configured
> {{similarityFactory}} for the original {{SolrIndexSearcher}} so the lucene
> default BM25 similarity is used
> # several of Solr's custom query impls have cache optimizations that kick in
> when they detect a {{SolrIndexSearcher}} which are not used
>
> {panel:title=Original Jira Descrption}
> Beginning with Solr 10.0.0, attempting to use any of the {{join}} QParsers in
> conjunction with QueryLimits results in a ClassCastException.
> This is because {{JoinQuery.createWeight(...)}} expects it will only ever be
> called with a {{{}SolrIndexSearcher{}}}, but
> {{SolrIndexSearcher.seach(Query,Collector)}} is overriddent to create an
> anonymous {{IndexSearcher}} to use when QueryLimits are enabled.
> This was not a problem in Solr 9.x, because back then the logic for creating
> an anonymous {{IndexSearcher}} was inside the overridden
> {{SolrIndexSearcher.seach(List<LeafReaderContext>,Weight,Collector)}} (after
> the {{Weight}} instance had already been created using the original
> {{{}SolrIndexSearcher{}}})
> {panel}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]