lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 子落 <>
Subject about Top N search for big doclist Optimization
Date Fri, 15 Nov 2013 08:17:03 GMT
Is there any method for Optimization on the scene.


My search is always like this  sex:boy and isbig:yes  

But  I only need the top 4 result ,not need sort by score.


The stored in lucene frq doclist file maybe like this


Sex,boy  ->  1,2,3,4,5,6,8,9,10…..9999999,1000000……100000000,10000001

isbig,yes->   9999999,1000000,1000001, 1000002……100000000,10000001


so the top 4 result may be is 9999999,1000000,1000001, 1000002.


Bit the doclist is so big ,need lots of IO to read all of them,but I only
need the top 4


So is there any method can do for this ,not weast so may io


First The doclist is ordered

Second we can jump some of doclist at head

There wen we collect 4 doclist is enough ,not need to read other doclist at
end of the 4 doclist 


The search maybe quickly .





View raw message