Details
-
Wish
-
Status: Resolved
-
Minor
-
Resolution: Not A Bug
-
7.4, 8.0
-
None
-
None
Description
DefaultIndexingChain.invert(...) callsĀ invertState.setAttributeSource(stream) before stream.incrementToken() is called.
For instances of stream that lazily instantiate token attributes (e.g., as solr.PreAnalyzedField$PreAnalyzedTokenizer does upon the first call to incrementToken() that returns true), this can result in caching a null value in invertState.termAttribute for a given stream instance.
Subsequent calls that reuse the same stream instance (reusing TokenStreamComponents) for field values with at least 1 token will call termHashPerField.start(...) which sets termsHashPerField.termAtt from the null value cached in the FieldInvertState.termAttribute. An NPE would be thrown when termsHashPerField.add() reasonably but incorrectly assumes a non-null value for termAtt.
Attachments
Attachments
Issue Links
- is superceded by
-
SOLR-13077 PreAnalyzedField TokenStreamComponents should be reusable
- Open