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 xu cheng <xc...@gmail.com> on 2010/11/17 07:06:24 UTC

sort desc and out of memory exception

hi all:
 I configure a solr application and there is a field of type text,and some
kind like this 123456, that is a string of number
and I wanna solr to sort the result on this field
however, when I use sort asc , it works perfectly ,and when I sort it with
desc, the application became unacceptablly slow
and finally , an OutOfMemoryException was throw.
does anyone have the same kind of problem?or any suggestions?

thanks

Re: sort desc and out of memory exception

Posted by Erick Erickson <er...@gmail.com>.
Need....more....coffee.... That link should have been:
http://wiki.apache.org/solr/UsingMailingLists

<http://wiki.apache.org/solr/UsingMailingLists>Erick

On Mon, Nov 22, 2010 at 8:03 AM, Erick Erickson <er...@gmail.com>wrote:

> Peter's point is that sorting on a tokenized field is meaningless. Say you
> index "erick xu peter" and it's tokenized. You have three tokens:
> "erick", "xu", and "peter". What does sorting mean now? Should the
> document be in the e's? x's? p's?
>
> So if you're sorting on a tokenized field, trying to understand why you
> get OOMs sorting desc (which I agree is kinda strange) is a waste
> of time.
>
> If you're NOT sorting on a tokenized field, can you answer some questions
> about your environment? How much memory are you giving the JVM? What
> version of Solr? etc. You might want to review:
> http://wiki.apache.org/solr/HowToContribute
>
> Best
> Erick
>
> On Sun, Nov 21, 2010 at 9:43 PM, xu cheng <xc...@gmail.com> wrote:
>
>> thanks for replying
>>
>> but when it's sort with asc, it runs pretty well
>> only if I sort with desc , it has the out o f memory exception
>>
>> 2010/11/17 Peter Karich <pe...@yahoo.de>
>>
>> >  You are applying the sort against a (tokenized) text field?
>> > You should better sort against a number or a string. Probably using the
>> > copyField directive.
>> >
>> > Regards,
>> > Peter.
>> >
>> >
>> >  hi all:
>> >>  I configure a solr application and there is a field of type text,and
>> some
>> >> kind like this 123456, that is a string of number
>> >> and I wanna solr to sort the result on this field
>> >> however, when I use sort asc , it works perfectly ,and when I sort it
>> with
>> >> desc, the application became unacceptablly slow
>> >> and finally , an OutOfMemoryException was throw.
>> >> does anyone have the same kind of problem?or any suggestions?
>> >>
>> >> thanks
>> >>
>> >>
>> >
>> > --
>> > http://jetwick.com twitter search prototype
>> >
>> >
>>
>
>

Re: sort desc and out of memory exception

Posted by Erick Erickson <er...@gmail.com>.
Peter's point is that sorting on a tokenized field is meaningless. Say you
index "erick xu peter" and it's tokenized. You have three tokens:
"erick", "xu", and "peter". What does sorting mean now? Should the
document be in the e's? x's? p's?

So if you're sorting on a tokenized field, trying to understand why you
get OOMs sorting desc (which I agree is kinda strange) is a waste
of time.

If you're NOT sorting on a tokenized field, can you answer some questions
about your environment? How much memory are you giving the JVM? What
version of Solr? etc. You might want to review:
http://wiki.apache.org/solr/HowToContribute

Best
Erick

On Sun, Nov 21, 2010 at 9:43 PM, xu cheng <xc...@gmail.com> wrote:

> thanks for replying
>
> but when it's sort with asc, it runs pretty well
> only if I sort with desc , it has the out o f memory exception
>
> 2010/11/17 Peter Karich <pe...@yahoo.de>
>
> >  You are applying the sort against a (tokenized) text field?
> > You should better sort against a number or a string. Probably using the
> > copyField directive.
> >
> > Regards,
> > Peter.
> >
> >
> >  hi all:
> >>  I configure a solr application and there is a field of type text,and
> some
> >> kind like this 123456, that is a string of number
> >> and I wanna solr to sort the result on this field
> >> however, when I use sort asc , it works perfectly ,and when I sort it
> with
> >> desc, the application became unacceptablly slow
> >> and finally , an OutOfMemoryException was throw.
> >> does anyone have the same kind of problem?or any suggestions?
> >>
> >> thanks
> >>
> >>
> >
> > --
> > http://jetwick.com twitter search prototype
> >
> >
>

Re: sort desc and out of memory exception

Posted by xu cheng <xc...@gmail.com>.
thanks for replying

but when it's sort with asc, it runs pretty well
only if I sort with desc , it has the out o f memory exception

2010/11/17 Peter Karich <pe...@yahoo.de>

>  You are applying the sort against a (tokenized) text field?
> You should better sort against a number or a string. Probably using the
> copyField directive.
>
> Regards,
> Peter.
>
>
>  hi all:
>>  I configure a solr application and there is a field of type text,and some
>> kind like this 123456, that is a string of number
>> and I wanna solr to sort the result on this field
>> however, when I use sort asc , it works perfectly ,and when I sort it with
>> desc, the application became unacceptablly slow
>> and finally , an OutOfMemoryException was throw.
>> does anyone have the same kind of problem?or any suggestions?
>>
>> thanks
>>
>>
>
> --
> http://jetwick.com twitter search prototype
>
>

Re: sort desc and out of memory exception

Posted by Peter Karich <pe...@yahoo.de>.
  You are applying the sort against a (tokenized) text field?
You should better sort against a number or a string. Probably using the 
copyField directive.

Regards,
Peter.

> hi all:
>   I configure a solr application and there is a field of type text,and some
> kind like this 123456, that is a string of number
> and I wanna solr to sort the result on this field
> however, when I use sort asc , it works perfectly ,and when I sort it with
> desc, the application became unacceptablly slow
> and finally , an OutOfMemoryException was throw.
> does anyone have the same kind of problem?or any suggestions?
>
> thanks
>


-- 
http://jetwick.com twitter search prototype