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 南拓弥 <takuya.p...@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 >