lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Pine <>
Subject SortComparatorSources and ScoreDocComparators
Date Tue, 11 Jul 2006 19:33:03 GMT
Hey Everyone,

I've had success in the past creating my own
SortComparatorSources and ScoreDocComparators (basing
my code on sec 6.1 from LIA); however, I'm starting to
run into some performance issues with large indexes.
When I started to probe deeper it seems that
enumerating through the TermDocs for a given field
amounts to looking at every document in my index. So
if I have 1M documents, but my search only matches
10K, my ScoreDocComparator ends up performing 990K
unnecessary score computations. Looking through the
source code of FieldSortedHitQueue, I see that there
is an attempt to do some caching of comparators. That
makes a lot of sense for plain old indexed sort
fields, but doesn't help at all for custom sort
calculations right?

Is there a way to tell Lucene to perform the sort
operation after the search/filter? I'm currently using
a TopFieldDocCollector in my search as opposed to a
search method which returns a Hits object. Thanx.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message