[
https://issues.apache.org/jira/browse/SOLR-4877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752158#comment-13752158
]
Uwe Schindler commented on SOLR-4877:
-------------------------------------
Hi the *calculation* is not a problem at all, it is done one time in
TermWeight. The statistics for the term have to be fetched in any case (as it
is part of the term dictionary). If this would be a problem here, a lot of
queries in Lucene like MultiTermQuery (NumericRangeQuery, TermRangeQuery,
FuzzyQuery) would need to be optimized, too, because they don't calculate
scores. The reason why this special case was here is caused by older Lucene
versions where the actual score *per document* was calculated by TermScorer
although not requested. This was the performance impact, not the term
statistics.
If you don't have a benchmark showing that fetching the term statistics for
this case is affecting performance I would prefer the simplier code.
> SolrIndexSearcher#getDocSetNC should check for null return in
> AtomicReader#fields()
> -----------------------------------------------------------------------------------
>
> Key: SOLR-4877
> URL: https://issues.apache.org/jira/browse/SOLR-4877
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.2, 4.3
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 4.3.1, 4.4, 5.0
>
> Attachments: SOLR-4877-nospecialcase.patch, SOLR-4877.patch
>
>
> In LUCENE-5023 it was reported that composite reader contexts should not
> contain null fields() readers. But this is wrong, as a null-fields() reader
> may contain documents, just no fields.
> fields() and terms() is documented to return null, so DocSets should check
> for null (like all queries do in Lucene). It seems that DocSetNC does not
> correctly check for null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]