You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jörg Rathlev (JIRA)" <ji...@apache.org> on 2015/07/16 16:38:05 UTC

[jira] [Created] (SOLR-7798) Improve robustness of ExpandComponent

Jörg Rathlev created SOLR-7798:
----------------------------------

             Summary: Improve robustness of ExpandComponent
                 Key: SOLR-7798
                 URL: https://issues.apache.org/jira/browse/SOLR-7798
             Project: Solr
          Issue Type: Improvement
          Components: SearchComponents - other
            Reporter: Jörg Rathlev
            Priority: Minor
         Attachments: expand-component.patch

The {{ExpandComponent}} causes a {{NullPointerException}} if accidentally used without prior collapsing of results.

If there are multiple documents in the result which have the same term value in the expand field, the size of the {{ordBytes}}/{{groupSet}} differs from the {{count}} value, and the {{getGroupQuery}} method creates an incompletely filled {{bytesRef}} array, which later causes a {{NullPointerException}} when trying to sort the terms.

The attached patch extends the test to demonstrate the error, and modifies the {{getGroupQuery}} methods to create the array based on the size of the input maps.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org