You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Girish Pandit <pa...@gmail.com> on 2010/07/17 03:54:54 UTC
HTTP ERROR: 500 - java.lang.ArrayIndexOutOfBoundsException
Hi,
As soon as I add "sort=first+desc" parameter to the select clause, it
throws ArrayIndexOutOfBound exception. Please suggest if I am missing
anything.
http://localhost:8983/solr/select?q=girish&start=0&indent=on&wt=json&sort=first+desc
I have close to 1 million records indexed.
Thanks
Girish
Re: HTTP ERROR: 500 - java.lang.ArrayIndexOutOfBoundsException
Posted by Lance Norskog <go...@gmail.com>.
You cannot sort on text fields, only string&number&date fields. The
ArrayIndexOutOfBounds exception happens when there are more terms to
sort on than documents (I think?).
On Sat, Jul 17, 2010 at 3:11 PM, Koji Sekiguchi <ko...@r.email.ne.jp> wrote:
> (10/07/18 4:51), Girish wrote:
>>
>> Hi Lance,
>>
>> Thanks for the reply!
>>
>> I checked the settings and I don't think it has multivalue setting. Here
>> is
>> the current field configuration:
>>
>> *<field name="id" type="string" indexed="true" stored="true"
>> required="true" />
>> <field name="first" type="textgen" indexed="true" stored="true"
>> termVectors="true" />
>> <field name="last" type="textgen" indexed="true" stored="true"/>
>> <field name="line1" type="textgen" indexed="true" stored="true"/>
>> <field name="state" type="textgen" indexed="true" stored="true"/>
>> <field name="zipcode" type="textgen" indexed="true" stored="true"/>
>> <field name="tax" type="textgen" indexed="true" stored="true"/>
>> **
>> *
>>
>>
>
> Tokenized field is one of multiValued type fields since
> multiple tokens (values) are generated in that field by
> tokenizer.
>
> Koji
>
> --
> http://www.rondhuit.com/en/
>
>
--
Lance Norskog
goksron@gmail.com
Re: HTTP ERROR: 500 - java.lang.ArrayIndexOutOfBoundsException
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(10/07/18 4:51), Girish wrote:
> Hi Lance,
>
> Thanks for the reply!
>
> I checked the settings and I don't think it has multivalue setting. Here is
> the current field configuration:
>
> *<field name="id" type="string" indexed="true" stored="true"
> required="true" />
> <field name="first" type="textgen" indexed="true" stored="true"
> termVectors="true" />
> <field name="last" type="textgen" indexed="true" stored="true"/>
> <field name="line1" type="textgen" indexed="true" stored="true"/>
> <field name="state" type="textgen" indexed="true" stored="true"/>
> <field name="zipcode" type="textgen" indexed="true" stored="true"/>
> <field name="tax" type="textgen" indexed="true" stored="true"/>
> **
> *
>
>
Tokenized field is one of multiValued type fields since
multiple tokens (values) are generated in that field by
tokenizer.
Koji
--
http://www.rondhuit.com/en/
Re: HTTP ERROR: 500 - java.lang.ArrayIndexOutOfBoundsException
Posted by Girish <pa...@gmail.com>.
Hi Lance,
Thanks for the reply!
I checked the settings and I don't think it has multivalue setting. Here is
the current field configuration:
* <field name="id" type="string" indexed="true" stored="true"
required="true" />
<field name="first" type="textgen" indexed="true" stored="true"
termVectors="true" />
<field name="last" type="textgen" indexed="true" stored="true"/>
<field name="line1" type="textgen" indexed="true" stored="true"/>
<field name="state" type="textgen" indexed="true" stored="true"/>
<field name="zipcode" type="textgen" indexed="true" stored="true"/>
<field name="tax" type="textgen" indexed="true" stored="true"/>
**
*
> *
> *Lance Norskog wrote:
>
> This can happen when there are multiple values in a field. Is 'first'
> a multi-valued field?
>
> Sorting only works on single-valued fields. After all, if there are
> multiple values, it can only sort on one field and there is no way to
> decide which one. So, make sure that 'field' has multiValued='false'
> in the field declaration. If this is the problem, you will have to fix
> your data and re-index.
>
> Is 'field' an analyzed text field? Then sorting definitely will not work.
>
> On Fri, Jul 16, 2010 at 6:54 PM, Girish Pandit <pa...@gmail.com> <pa...@gmail.com> wrote:
>
>
> Hi,
>
> As soon as I add "sort=first+desc" parameter to the select clause, it throws
> ArrayIndexOutOfBound exception. Please suggest if I am missing anything.
> http://localhost:8983/solr/select?q=girish&start=0&indent=on&wt=json&sort=first+desc
>
> I have close to 1 million records indexed.
>
> Thanks
> Girish
>
>
>
>
>
>
>
>
--
************************************************
Girish Pandit
610-517-5888
http://www.jiyasoft.com
http://www.photographypleasure.com/
http://www.photographypleasure.com/girish/
Re: HTTP ERROR: 500 - java.lang.ArrayIndexOutOfBoundsException
Posted by Lance Norskog <go...@gmail.com>.
This can happen when there are multiple values in a field. Is 'first'
a multi-valued field?
Sorting only works on single-valued fields. After all, if there are
multiple values, it can only sort on one field and there is no way to
decide which one. So, make sure that 'field' has multiValued='false'
in the field declaration. If this is the problem, you will have to fix
your data and re-index.
Is 'field' an analyzed text field? Then sorting definitely will not work.
On Fri, Jul 16, 2010 at 6:54 PM, Girish Pandit <pa...@gmail.com> wrote:
> Hi,
>
> As soon as I add "sort=first+desc" parameter to the select clause, it throws
> ArrayIndexOutOfBound exception. Please suggest if I am missing anything.
>
> http://localhost:8983/solr/select?q=girish&start=0&indent=on&wt=json&sort=first+desc
>
> I have close to 1 million records indexed.
>
> Thanks
> Girish
>
>
>
--
Lance Norskog
goksron@gmail.com