lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Vasiliev <art...@gmail.com>
Subject OutOfMemory with search(Query, Sort)
Date Fri, 31 Mar 2006 22:41:29 GMT
Hi all!

I use Lucene in my 'sharehound' opensource project
(http://sharehound.sourceforge.net). In last version (1.0.8 and 1.0.9)
I've tried to utilize Lucene's sorting function - I use
indexSearcher.search(query, sort) for that, where sort = new
Sort(sortFieldName, sortDescending). On relatively small index (40000
docs) it ran OK though I've noticed that the speed is pretty much the
same with large and small resultsets. But on large index (4mln docs) I
get big delay with CPU to 100% and then OutOfMemoryError even when
there's only 1 document in the resultset! Seems like this case sorts
all the index instead of a resultest which is very unexpected.

indexSearcher.search(query) continues to work fine (I use it first to
get an unsorted list of results); also I use custom sorter (via
SortField(fieldName, comparator)) for indexSearcher.search(query,
sort) which also seem to work fine! I get only two invocations of
ScoreDocComparator.compare for resultset of two docs.

What could it be? May be I do something simple wrong?

I use lucene 1.9.1. Unfortunately the sharehound 1.0.9 code isn't in CVS
currently (SF's CVS is down now) but the source is included in the
release zip, so you can check it. Search is called through
org.sourceforge.sharehound.lucene.FilesSearchCommandImpl.findFilesByQuery().


Thanks in advance.
 Artem


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


Mime
View raw message