[
https://issues.apache.org/jira/browse/SOLR-8397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049537#comment-15049537
]
Peter Ciuffetti commented on SOLR-8397:
---------------------------------------
Good point! I wasn't expecting any highlights. This was an unfortunate side
effect of our middleware always defaulting to having highlighting on unless
turned off, and also having a backwards default of usePhraseHighlighter=false.
This particular query didn't need any highlighting. But in our attempt to
upgrade from 4.10 to 5.3 I'm dealing with legacy queries embedded in various
unit tests and frontend code.
So I have already worked around this by making the default
usePhraseHighlighter=true. You can mark this bug minor or 'wont fix' if you'd
like... just thought it should be reported. Maybe others will run into it if
they use highlight queries maybe? Haven't tried this.
> QueryScorer highlighting with join query causes classcast exception
> -------------------------------------------------------------------
>
> Key: SOLR-8397
> URL: https://issues.apache.org/jira/browse/SOLR-8397
> Project: Solr
> Issue Type: Bug
> Components: highlighter
> Affects Versions: 5.3
> Environment: SolrCloud 5.3.1
> Reporter: Peter Ciuffetti
>
> If you use the combination of a join query with the 'old' QueryScorer as a
> highlighter, you get a classcast exception
> {code}
> java.lang.ClassCastException: org.apache.lucene.search.IndexSearcher cannot
> be cast to org.apache.solr.search.SolrIndexSearcher
> at
> org.apache.solr.search.JoinQuery.createWeight(JoinQParserPlugin.java:217)
> at
> org.apache.lucene.search.IndexSearcher.createWeight(IndexSearcher.java:855)
> at
> org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:838)
> at
> org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTermExtractor.java:131)
> at
> org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTermExtractor.java:106)
> at
> org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTermExtractor.java:119)
> at
> org.apache.lucene.search.highlight.QueryTermExtractor.getTerms(QueryTermExtractor.java:62)
> at
> org.apache.lucene.search.highlight.QueryTermScorer.<init>(QueryTermScorer.java:52)
> at
> org.apache.solr.highlight.DefaultSolrHighlighter.getQueryScorer(DefaultSolrHighlighter.java:244)
> at
> org.apache.solr.highlight.DefaultSolrHighlighter.getHighlighter(DefaultSolrHighlighter.java:197)
> at
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:586)
> at
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:428)
> at
> org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:143)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:277)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
> {code}
> the query parameters that will produce this are
> {code}
> ?hl=true
> &hl.usePhraseHighlighter=false
> &hl.fl=somefield
> &q={!join from=x to=y}somequery
> {code}
> This does not happen when the default SpanScorer is used (which happens when
> hl.usePhraseHighlighter=true or is unspecified)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]