You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by 南拓弥 <ta...@gmail.com> on 2022/09/29 15:39:29 UTC

NPE in collapse

Hello all,

NPE in collapse hint=top_fc,
When there are no segments, using hint=top_fc in collapse results in NPE.

* query
http://localhost:8983/solr/bukken/select?fq={!collapse
field=str_field&hint=top_fc}&indent=true&q.op=OR&q=*:*&useParams=

* response
"error":{
    "msg":"Cannot invoke
\"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
\"this.collapseValues\" is null",
    "trace":"java.lang.NullPointerException: Cannot invoke
\"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
\"this.collapseValues\" is null\n\tat
org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621)\n\tat
org.apache.solr.search.CollapsingQParserPlugin$CollectorFactory.getCollector(CollapsingQParserPlugin.java:2125)
.....

Has this issue already been discussed?

Minami Takuya

Re: NPE in collapse

Posted by Joel Bernstein <jo...@gmail.com>.
Oh, there are no segments...

If this error is still occurring in the latest Solr version without top_fc
hint then it's a bug.

Joel Bernstein
http://joelsolr.blogspot.com/


On Thu, Sep 29, 2022 at 3:27 PM Joel Bernstein <jo...@gmail.com> wrote:

> What version of Solr are you using?
>
> Try removing the top_fc hint, does the error still occur?
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Thu, Sep 29, 2022 at 12:47 PM 南拓弥 <ta...@gmail.com> wrote:
>
>> Hello all,
>>
>> NPE in collapse hint=top_fc,
>> When there are no segments, using hint=top_fc in collapse results in NPE.
>>
>> * query
>> http://localhost:8983/solr/bukken/select?fq={!collapse
>> field=str_field&hint=top_fc}&indent=true&q.op=OR&q=*:*&useParams=
>>
>> * response
>> "error":{
>>     "msg":"Cannot invoke
>> \"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
>> \"this.collapseValues\" is null",
>>     "trace":"java.lang.NullPointerException: Cannot invoke
>> \"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
>> \"this.collapseValues\" is null\n\tat
>>
>> org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621)\n\tat
>>
>> org.apache.solr.search.CollapsingQParserPlugin$CollectorFactory.getCollector(CollapsingQParserPlugin.java:2125)
>> .....
>>
>> Has this issue already been discussed?
>>
>> Minami Takuya
>>
>

Re: NPE in collapse

Posted by Joel Bernstein <jo...@gmail.com>.
What version of Solr are you using?

Try removing the top_fc hint, does the error still occur?


Joel Bernstein
http://joelsolr.blogspot.com/


On Thu, Sep 29, 2022 at 12:47 PM 南拓弥 <ta...@gmail.com> wrote:

> Hello all,
>
> NPE in collapse hint=top_fc,
> When there are no segments, using hint=top_fc in collapse results in NPE.
>
> * query
> http://localhost:8983/solr/bukken/select?fq={!collapse
> field=str_field&hint=top_fc}&indent=true&q.op=OR&q=*:*&useParams=
>
> * response
> "error":{
>     "msg":"Cannot invoke
> \"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
> \"this.collapseValues\" is null",
>     "trace":"java.lang.NullPointerException: Cannot invoke
> \"org.apache.lucene.index.SortedDocValues.getValueCount()\" because
> \"this.collapseValues\" is null\n\tat
>
> org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621)\n\tat
>
> org.apache.solr.search.CollapsingQParserPlugin$CollectorFactory.getCollector(CollapsingQParserPlugin.java:2125)
> .....
>
> Has this issue already been discussed?
>
> Minami Takuya
>