lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: search performance enhancement
Date Wed, 17 Aug 2005 06:44:09 GMT
Hi John,

On Wednesday 17 August 2005 04:46, John Wang wrote:
> Hi:
>    I posted a bug (36147) a few days ago and didn't hear anything, so
> I thought I'd try my luck on this list.
>    The idea is to avoid score calculations on documents to be filtered
> out anyway. (e.g. via Filter object passed to the searcher class)
>    This seems to be an easy change.

Have a look here:

>    Also it would be nice to expose a method to return a score given a
> docid, e.g.
>    float getScore(int docid)
>    on the Scorer class.

skipTo(int docid) and score() will do that.
>    I am gonna make the change locally and do some performance analysis
> on it and will post some numbers later.

The default score computations are mostly table lookups, and pretty fast.
So, unless you have large indexes, this will probably not make
much difference, but any performance improvement is wellcome.
In larger indexes, it helps to use skipTo() while searching.

Paul Elschot

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

View raw message