lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Klaas <mike.kl...@gmail.com>
Subject Re: BoostingTermQuery performance
Date Wed, 03 Oct 2007 00:25:24 GMT
On 2-Oct-07, at 3:44 PM, Peter Keegan wrote:

> I have been experimenting with payloads and BoostingTermQuery,  
> which I think
> are excellent additions to Lucene core. Currently,  
> BoostingTermQuery extends
> SpanQuery. I would suggest changing this class to extend TermQuery and
> refactor the current version to something like 'BoostingSpanQuery'.
>
> The reason is rooted in performance. In my testing, I compared query
> throughput using TermQuery against 2 versions of BoostingTermQuery  
> - the
> current one that extends SpanQuery and one that extends TermQuery  
> (which
> I've included, below). Here are the results (qps = queries per  
> second):
>
> TermQuery:    200 qps
> BoostingTermQuery (extends SpanQuery): 97 qps
> BoostingTermQuery (extends TermQuery): 130 qps
>
> Here is a version of BoostingTermQuery that extends TermQuery. I  
> had to
> modify TermQuery and TermScorer to make them public. A code review  
> would be
> in order, and I would appreciate your comments on this suggestion.

Awesome!  I wasn't aware that there was such a difference.  With a  
performance gap that large, it is definitely worth having the option.

Payload have the potential to be a heavily-used feature in Lucene,  
and performacen will be key for that.

-Mike

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