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