On Fri, Apr 21, 2017 at 1:09 PM, 马可阳 <makey...@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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org