Well, the original problem statement was that there is a list of doc IDs. On the assumption that these are _lucene_ doc IDs, it's just a matter of turning on the bit for each indicated doc in a relatively small, in-memory structure. This presumably could be done once whenever the original list of doc IDs was generated.
But it's almost certainly going to be cheaper than constructing a large OR clause consisting of thousands of doc IDs... Best Erick On Tue, Oct 16, 2012 at 9:19 AM, Apostolis Xekoukoulotakis <xekou...@gmail.com> wrote: > How much time does it take to load a filter? If the filter needs to change > for every query, that might be a problem. > > 2012/10/16 Erick Erickson <erickerick...@gmail.com> > >> You probably want to use a Lucene Filter then use >> one of the query methods that takes a filter. >> >> Best >> Erick >> >> On Tue, Oct 16, 2012 at 4:36 AM, sxam <sx...@yahoo.com> wrote: >> > Hi, >> > Prior to search I have a concrete list of Lucene Document Ids (different >> > every time) and I want to limit my search only to those specific >> documents. >> > Is there a way to do it? I don't need to check any fields or anything, I >> > know the possible document ids before so if possible I wouldn't want to >> use >> > Query.. Besides it would be a huge query (let's say I want to limit to >> 5,000 >> > documents ids, it would be 5,000 Clauses..). >> > >> > Any help is greatly appreciated, >> > >> > Maxim >> > >> > >> > >> > -- >> > View this message in context: >> http://lucene.472066.n3.nabble.com/Restrict-Lucene-search-in-concrete-document-ids-tp4013905.html >> > Sent from the Lucene - Java Users mailing list archive at Nabble.com. >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> > For additional commands, e-mail: java-user-h...@lucene.apache.org >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> > > > -- > > > Sincerely yours, > > Apostolis Xekoukoulotakis --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org