Re: ArrayIndexOutOfBoundsException for query with rows=0 and sort param

2010-12-01 Thread Martin Grotzke
On Tue, Nov 30, 2010 at 7:51 PM, Martin Grotzke wrote: > On Tue, Nov 30, 2010 at 3:09 PM, Yonik Seeley > wrote: >> On Tue, Nov 30, 2010 at 8:24 AM, Martin Grotzke >> wrote: >>> Still I'm wondering, why this issue does not occur with the plain >>> example solr setup with 2 indexed docs. Any expla

Re: ArrayIndexOutOfBoundsException for query with rows=0 and sort param

2010-11-30 Thread Martin Grotzke
On Tue, Nov 30, 2010 at 3:09 PM, Yonik Seeley wrote: > On Tue, Nov 30, 2010 at 8:24 AM, Martin Grotzke > wrote: >> Still I'm wondering, why this issue does not occur with the plain >> example solr setup with 2 indexed docs. Any explanation? > > It's an old option you have in your solrconfig.xml t

Re: ArrayIndexOutOfBoundsException for query with rows=0 and sort param

2010-11-30 Thread Yonik Seeley
On Tue, Nov 30, 2010 at 8:24 AM, Martin Grotzke wrote: > Still I'm wondering, why this issue does not occur with the plain > example solr setup with 2 indexed docs. Any explanation? It's an old option you have in your solrconfig.xml that causes a different code path to be followed in Solr:

Re: ArrayIndexOutOfBoundsException for query with rows=0 and sort param

2010-11-30 Thread Martin Grotzke
On Tue, Nov 30, 2010 at 10:29 AM, Michael McCandless wrote: > Hmm this is in fact a regression. > > TopFieldCollector expects (but does not verify) that numHits is > 0. > > I guess to fix this we could fix TopFieldCollector.create to return a > NullCollector when numHits is 0. Fixing this in luce

Re: ArrayIndexOutOfBoundsException for query with rows=0 and sort param

2010-11-30 Thread Michael McCandless
Hmm this is in fact a regression. TopFieldCollector expects (but does not verify) that numHits is > 0. I guess to fix this we could fix TopFieldCollector.create to return a NullCollector when numHits is 0. But: why is your app doing this? Ie, if numHits (rows) is 0, the only useful thing you ca