lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem <abub...@gmail.com>
Subject want to commit -> new JIRA account?
Date Sun, 07 Jan 2007 08:21:37 GMT
Dear all,

I want to commit some code to Lucene and I guess I need a Jira account for that,
can anybody help?

It's a small addition to Lucene that significantly lowers memory consumption and
improves performance for sorted searches with frequent index updates scenario.
This solution supports only single-field sorting currently (which quite satisfy
my needs).

I faced a memory/time consumption problem on sorting in Lucene back in
April. With a help of this list's experts I came to solution which I
like: documents from the sorting set (instead of given the field's
values from the whole index) are lazy-cached in a WeakHashMap so the
cached items are candidates for GC. 

This is not quite a patch - no Lucene classes are changed, just a few of new
classes are added.

LazyCachingSortFactory class have an example of use in its header
comments, I duplicate it here:

 * An example of use:
 *  ...
 * //indexSearcher's reader will be passed to CachingDocFieldComparatorSource eventually
 * IndexSearcher indexSearcher = new IndexSearcher(CachingIndexReader.decorateIfNeeded(IndexReader.open(getIndexDir())));
 *
 * hits = indexSearcher.search(query, LazyCachingSortFactory.create(listSorting.getSortFieldName(),
listSorting.isSortDescending()));

I successfully use this approach for about half a year at my open-source project, sharehound
(http://sharehound.sourceforge.net). The code can be now reached by a
CVS browser, it's 5 classes in subdirectories of
http://sharehound.cvs.sourceforge.net/sharehound/jNetCrawler/src/java/org/apache/lucene/.

They (both classes, as a part of lucene-lazycaching.jar, and sources) can also
be downloaded with the latest (1.1.7 alpha) sharehound release zip
file. 

-- 
With best regards,
 Artem                          mailto:abublic@gmail.com


---------------------------------------------------------------------
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