From java-user-return-30268-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Fri Sep 14 15:46:20 2007 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 47202 invoked from network); 14 Sep 2007 15:46:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Sep 2007 15:46:19 -0000 Received: (qmail 62111 invoked by uid 500); 14 Sep 2007 15:46:05 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 62064 invoked by uid 500); 14 Sep 2007 15:46:05 -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 62046 invoked by uid 99); 14 Sep 2007 15:46:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Sep 2007 08:46:05 -0700 X-ASF-Spam-Status: No, hits=-2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Chris.Sizemore@bbc.co.uk designates 132.185.144.142 as permitted sender) Received: from [132.185.144.142] (HELO mailgw2.mh.bbc.co.uk) (132.185.144.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Sep 2007 15:47:47 +0000 Received: from bbcxue219.national.core.bbc.co.uk ([10.164.8.50]) by mailgw2.mh.bbc.co.uk (8.13.7/8.13.7) with ESMTP id l8EFjiKL005853 for ; Fri, 14 Sep 2007 16:45:44 +0100 (BST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7F6E6.4F7A92D2" Subject: how best to limit search result to a subset of document ids? Date: Fri, 14 Sep 2007 16:45:43 +0100 Message-ID: <22E75701DF55CB459F5EC560C366846703F0E5B8@bbcxue219.national.core.bbc.co.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: how best to limit search result to a subset of document ids? Thread-Index: Acf25k94IexqelQvTnaU22CqGVlDcw== From: "Chris Sizemore" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7F6E6.4F7A92D2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello-- i'm trying to figure out the best way to limit a query to a small subset = if a lucene index's documents, and i'm a bit of a novice and a bit stumpe= d... my scenario is: 1) search the index for a term (very boring normal case) 2) take the top 5 results from that search result set=20 3) next, do a MoreLikeThis query where ONLY those 5 documents are valid t= o search against (BTW, the MLT query is based on a separately supplied do= c which needs to be compared) hoping this scenario makes some sense... should i put together a boolean query with the 5 doc ids, a la: "id:282707 OR id:389447" or should i try to set up a QueryFilter with a list of document ids? and = any pointers as to what the syntax should be to add doc ids to a QueryFil= ter? also, is it possible that Lucene in Action (which i have) is a bit out of= date in this area now? any thoughts would be greatly appreciated... best-- --chris sizemore http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain persona= l views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in relian= ce on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. =09 ------_=_NextPart_001_01C7F6E6.4F7A92D2--