lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: How to improve the performance in Lucene when query is long?
Date Tue, 11 Nov 2014 13:22:30 GMT
Hi Harry,

May be you can use BooleanQuery#setMinimumNumberShouldMatch method. What happens when you
use set it to half of the numTerms?


On Tuesday, November 11, 2014 8:35 AM, Harry Yu <> wrote:
Hi everyone,

I have been using Lucene to build a POI searching & geocoding system. After test, I found
that when query is long(above 10 terms). And the speed of searching is too slow near to 1s.
I think the bottleneck is that I used OR to generate my BooleanQuery. It would get plenty
of candidates documents. And it would also consume too many time to score and rank.

I changed to use AND to generate my BooleanQuery. But it decrease the accuracy of hits. So
I want to find a solution to reduce candidate documents and do not decrease the accuracy in
this situation.

Thanks for your help!‍

Harry YuInstitute of Remote Sensing and Geographic Information System.
School of Earth and Space Sciences, Peking University;
Beijing, China, 100871;
Email: OR 

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

View raw message