lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toke Eskildsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2335) optimization: when sorting by field, if index has one segment and field values are not needed, do not load String[] into field cache
Date Tue, 06 Apr 2010 10:41:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853847#action_12853847
] 

Toke Eskildsen commented on LUCENE-2335:
----------------------------------------

I've mis-read Michael McCandless intention with this issue and have been working under a broader
scope. A new issue has been opened at https://issues.apache.org/jira/browse/LUCENE-2369 where
I will continue that work.

LUCENE-2335 could be implemented by extending LUCENE-2369 to take null as a comparator. For
single-segments this should be on par with a dedicated implementation and for multi-segments
the merging of the ordinals should be fairly efficient. The big downside is that this would
be a hard decision, meaning that multi-segment sorted search without locale would always have
the start-up overhead.

I guess the better choice would be to recommend using LUCENE-2335 for non-locale based sorted
searches only if increased startup-time is acceptable.

> optimization: when sorting by field, if index has one segment and field values are not
needed, do not load String[] into field cache
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2335
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2335
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1
>
>
> Spinoff from java-dev thread "Sorting with little memory: A suggestion", started by Toke
Eskildsen.
> When sorting by SortField.STRING we currently ask FieldCache for a StringIndex on that
field.
> This can consumes tons of RAM, when the values are mostly unique (eg a title field),
as it populates both int[] ords as well as String[] values.
> But, if the index is only one segment, and the search sets fillFields=false, we don't
need the String[] values, just the int[] ords.  If the app needs to show the fields it can
pull them (for the 1 page) from stored fields.
> This can be a potent optimization -- alot of RAM saved -- for optimized indexes.
> When fixing this we must take care to share the int[] ords if some queries do fillFields=true
and some =false... ie, FieldCache will be called twice and it should share the int[] ords
across those invocations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message