[ 
https://issues.apache.org/jira/browse/SOLR-13877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16990719#comment-16990719
 ] 

ASF subversion and git services commented on SOLR-13877:
--------------------------------------------------------

Commit 65a1804aebd77e6b088da362d119de07917d5d8f in lucene-solr's branch 
refs/heads/branch_8x from Michael Gibney
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=65a1804 ]

SOLR-7798: robust support for expand when used w/o collapsing (#325)

There are applications of ExpandComponent that intentionally do not
involve prior collapsing of results on the expand field, which can lead
to an NPE in expand component when expand.field (for matched docs) has
fewer unique values than the number of matched docs.

This commit refines the approach taken in SOLR-13877, which addressed
the same underlying issue.

> NPE in ExpandComponent
> ----------------------
>
>                 Key: SOLR-13877
>                 URL: https://issues.apache.org/jira/browse/SOLR-13877
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Munendra S N
>            Assignee: Munendra S N
>            Priority: Major
>              Labels: collapse, expand
>             Fix For: 8.4
>
>         Attachments: SOLR-13877.patch
>
>
> Truncated Stack trace
> {code:java}
> Caused by: java.lang.NullPointerException
>       at org.apache.lucene.util.BytesRef.compareTo(BytesRef.java:162)
>       at org.apache.lucene.util.BytesRef.compareTo(BytesRef.java:36)
>       at 
> java.base/java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:52)
>       at 
> java.base/java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:47)
>       at org.apache.lucene.util.ArrayTimSorter.compare(ArrayTimSorter.java:48)
>       at org.apache.lucene.util.TimSorter.nextRun(TimSorter.java:109)
>       at org.apache.lucene.util.TimSorter.sort(TimSorter.java:201)
>       at org.apache.lucene.util.ArrayUtil.timSort(ArrayUtil.java:452)
>       at org.apache.lucene.util.ArrayUtil.timSort(ArrayUtil.java:471)
>       at org.apache.lucene.util.ArrayUtil.timSort(ArrayUtil.java:479)
>       at 
> org.apache.lucene.search.TermInSetQuery.<init>(TermInSetQuery.java:85)
>       at 
> org.apache.lucene.search.TermInSetQuery.<init>(TermInSetQuery.java:107)
>       at 
> org.apache.solr.handler.component.ExpandComponent.getGroupQuery(ExpandComponent.java:746)
>       at 
> org.apache.solr.handler.component.ExpandComponent.process(ExpandComponent.java:330)
>       at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:328)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:198)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:2583)
>       at org.apache.solr.util.TestHarness.query(TestHarness.java:339)
>       at org.apache.solr.util.TestHarness.query(TestHarness.java:321)
>       at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:972)
> {code}
> This could happen when expand component is used without collapse and docs 
> returned have fewer unique values



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to