lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: will lucene traverse all segments to search a 'primary key'term or will it stop as soon as it get one?
Date Fri, 21 Apr 2017 05:15:27 GMT
On Fri, Apr 21, 2017 at 1:09 PM, 马可阳 <makeyang@jd.com> wrote:
> Let’s say I have a user info index and user id is the ‘primary key’. So when I
do a userid term search,
> will lucene traverse all segments to search a 'primary key'term or will it stop as soon
as it get one?
>
> If it is the latter one, will any plan to make it the former way?

Thoughts:

1) What happens if you limit the result count to 1 *and* turn scoring off?

2) If that didn't work, a custom collector which terminates on finding
a single hit sounds easy enough to write.

TX

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