Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8655D87F for ; Tue, 16 Oct 2012 13:29:48 +0000 (UTC) Received: (qmail 20231 invoked by uid 500); 16 Oct 2012 13:29:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 19933 invoked by uid 500); 16 Oct 2012 13:29:46 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 19903 invoked by uid 99); 16 Oct 2012 13:29:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 13:29:45 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 13:29:38 +0000 Received: by mail-we0-f176.google.com with SMTP id z53so4282864wey.35 for ; Tue, 16 Oct 2012 06:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TWsxYG6ebeOZLWvSA5EG/9i29EyVtdo5pfWyCH5KbnY=; b=VQOvNO9zTKQlpVNs1WtSwp/p8roCrlNN4lRydY8Au4UR5dA70UYQf8IL7V648mT842 7cUibxq986OG9u/aSJJr6KEroLl998F/sn2t/jZqRDNr3FQmkVd4co8AycTTREry+uvr hAwjuK8OE7L2ybX2lYzNRbvW2Pr11hvpMM3AkIdBPPE1eBQfWwt+hWzQIwlZyrddEApe SV7E5Jn9arjrYbdna1aA22xnO8ColizECDOu+MdZYmfMZuFPBfU5mFUm7gZwLsZAQeta /Wn7JpwRUdMa3L5upfiUGkgLq8WgtwEPu5t/mc1eRZC5sL8NNHzjMMz0chQXJSOkOkMC 0lUg== MIME-Version: 1.0 Received: by 10.180.89.7 with SMTP id bk7mr32057688wib.0.1350394158346; Tue, 16 Oct 2012 06:29:18 -0700 (PDT) Received: by 10.223.32.12 with HTTP; Tue, 16 Oct 2012 06:29:18 -0700 (PDT) In-Reply-To: References: <1350376607967-4013905.post@n3.nabble.com> Date: Tue, 16 Oct 2012 09:29:18 -0400 Message-ID: Subject: Re: Restrict Lucene search in concrete document ids From: Erick Erickson To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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 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 > >> 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 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-unsubscribe@lucene.apache.org >> > For additional commands, e-mail: java-user-help@lucene.apache.org >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > > -- > > > Sincerely yours, > > Apostolis Xekoukoulotakis --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org