Never meant to imply that it wasn't memory bound! It _is_ memory bound
(or at least can be), it's just that the memory consumed isn't
proportional to the number of documents matched, but to the total
number of documents in your index. Although that all said, once all
the structures are in memory, the load shifts to CPU.

Best,
Erick

On Tue, Jun 2, 2015 at 7:20 AM, Steven White <swhite4...@gmail.com> wrote:
> Hi Erick,
>
> I didn't know this isn't memory bound, but it got to be CPU bound, no?
>
> Thanks
>
> Steve
>
> On Mon, Jun 1, 2015 at 12:27 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> Steve:
>>
>> Surprisingly, the number of hits is completely irrelevant for the
>> memory requirements for sorting. The base memory size is, AFAIK, an
>> array of maxDoc ints (you can find maxDoc on the admin screen).
>> There's some additional overhead, but that's the base size. If you sue
>> DocValues, much of the overhead is kept in the MMapDirectory space
>> IIRC.
>>
>> Best,
>> Erick
>>
>>
>> On Mon, Jun 1, 2015 at 8:41 AM, Shawn Heisey <apa...@elyograg.org> wrote:
>> > On 6/1/2015 9:29 AM, Steven White wrote:
>> >> I need to be able to sot in Solr.  Obviously, I need to do this in a way
>> >> sorting won't cause OOM when a result may contain 1000's of hits if not
>> >> millions.  Can you guide me on how I can do this?  Is there a way to
>> tell
>> >> Solr sort top N results (discarding everything else) or must such
>> sorting
>> >> be cone on the client side?
>> >
>> > Solr supports sorting.
>> >
>> > https://wiki.apache.org/solr/CommonQueryParameters#sort
>> >
>> >
>> https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-ThesortParameter
>> >
>> > I think we may have an omission from the docs -- docValues can also be
>> > used for sorting, and may also offer a performance advantage.
>> >
>> > Thanks,
>> > Shawn
>> >
>>

Reply via email to