Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 82358 invoked from network); 5 Jun 2007 18:05:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2007 18:05:05 -0000 Received: (qmail 2040 invoked by uid 500); 5 Jun 2007 18:05:02 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 1846 invoked by uid 500); 5 Jun 2007 18:05:02 -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 1834 invoked by uid 99); 5 Jun 2007 18:05:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 11:05:01 -0700 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of hilton.campbell@gmail.com designates 64.233.162.232 as permitted sender) Received: from [64.233.162.232] (HELO nz-out-0506.google.com) (64.233.162.232) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 11:04:57 -0700 Received: by nz-out-0506.google.com with SMTP id x7so1238807nzc for ; Tue, 05 Jun 2007 11:04:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=NL2HQNL0kfehQgK5/nPlkw5UjGU+qUFUA4ppz9j7KoSNeqSQGvQImQKeoTKkQB2cQSmPY+UjA9PlzMMBFv7lb7e7L3dmaV+NusTYF/dszRSRUcu6a95OM7J3MgHGWKDtUIqEG32stBFz6V8dsBL3AUld/4mLz3p85EsbTRaSebc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=smIzsycH7G/5n7ANBqUxAVevNWwQnQZ3pSmiJ4g3cl/foKX4521dSR08Gu0MFOMpQZysf5MhAqb72LeC3UP5B7ucYXyU4ivnGVSC/fQKFIhNmXwqAm5MxvVO5ZPUKSvYL3Fh5lo9p6IEUSQfrBXEnE2eHs4Ur89DLfp2rQ3YcfI= Received: by 10.114.88.1 with SMTP id l1mr6203518wab.1181066673834; Tue, 05 Jun 2007 11:04:33 -0700 (PDT) Received: by 10.114.200.11 with HTTP; Tue, 5 Jun 2007 11:04:33 -0700 (PDT) Message-ID: <8d6059bb0706051104o32fd328ci42a8744db959f44c@mail.gmail.com> Date: Tue, 5 Jun 2007 12:04:33 -0600 From: "Hilton Campbell" To: java-user@lucene.apache.org Subject: How can I search over all documents NOT in a certain subset? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_26638_21808257.1181066673812" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_26638_21808257.1181066673812 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all, In my application I want to perform a search over all the documents that are NOT in a certain subset, and I'm not sure how I should do it. Specifically, the application performs a search and the top N results are shown to the user. The user may then opt to see the next top N results. By the time the user chooses to see the next N results, however, there may be new, highly-relevant documents in the index (as indexing is occurring concurrently). So instead of just skipping to the next N, I need to perform a new search and get the top N that haven't been seen yet. Is anyone aware of an efficient way to implement this? I can think of at least one way: I can keep track of the documents that have been seen and iterate through all the hits, skipping those that have already been seen. I just want to see if there isn't a better way that doesn't iterate through potentially hundreds of already seen hits, or if anyone has any pointers on an efficient implementation of this idea. Thanks! Hilton Campbell ------=_Part_26638_21808257.1181066673812--