[ 
https://issues.apache.org/jira/browse/LUCENE-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464038
 ] 

Hoss Man commented on LUCENE-769:
---------------------------------

Artem: while i agree with Yonik/Chuck's comments about your performance tests 
probably not being realistic in the general case, what i really like about your 
patch is that it makes no attempt to change the default behavior of sorting in 
a way that would hurt users by default -- users would only get this behavior if 
they choose to use it, and while the "typical" case may not bnefit from it, i'm 
sure there are plenty of situations where people *know* their index is big, and 
*know* that they are doing a search that should have a small number of results. 
 adding something like this doesn't proclude future work on making sorting 
using FieldCache's less prohibitive (ie: an IndexReader.reopen approach)

what does concern me about this patch is that without better javadocs 
explaining exactly what it does and when it's usefull, it could easily be 
missued by people who stumble upon it.

I also don't understand why in your updated version of the patch, you aren't 
making an attempt to use the FieldSelector version of IndexReader.document(), 
since it should *allways* be faster in this use case, and would result in your 
memory cache talking up less space.

I also don't understand your "IndexReader members access rights problems 
raised" ... a subclass of IndexReader should be able to live freely in any 
package -- including as a private static class inside of another class.  
perhaps you ran into problems because you are attempting to subclass methods 
you don't really need to worry about subclassing? ... yet another reason to 
subclass FilterIndexReader and save yourself some headaches.

> [PATCH] Performance improvement for some cases of sorted search
> ---------------------------------------------------------------
>
>                 Key: LUCENE-769
>                 URL: https://issues.apache.org/jira/browse/LUCENE-769
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: Artem Vasiliev
>         Attachments: DocCachingSorting.patch, DocCachingSorting.patch, 
> QueryFilter.java, StoredFieldSorting.patch
>
>
> It's a small addition to Lucene that significantly lowers memory consumption 
> and improves performance for sorted searches with frequent index updates and 
> relatively big indexes (>1mln docs) scenario. This solution supports only 
> single-field sorting currently (which seem to be quite popular use case). 
> Multiple fields support can be added without much trouble.
> The solution is this: documents from the sorting set (instead of given 
> field's values from the whole index - current FieldCache approach) are cached 
> in a WeakHashMap so the cached items are candidates for GC.  Their fields 
> values are then fetched from the cache and compared while sorting.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to