Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 44690 invoked from network); 15 Jun 2005 00:12:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jun 2005 00:12:13 -0000 Received: (qmail 10827 invoked by uid 500); 15 Jun 2005 00:12:08 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 10799 invoked by uid 500); 15 Jun 2005 00:12:07 -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 10781 invoked by uid 99); 15 Jun 2005 00:12:07 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from ddsl-216-68-218-166.fuse.net (HELO home.simpleobjects.com) (216.68.218.166) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 14 Jun 2005 17:12:02 -0700 Received: from graphite (graphite.intranet [192.168.2.2]) by home.simpleobjects.com (Postfix) with ESMTP id 6508D33C42; Tue, 14 Jun 2005 20:11:47 -0400 (EDT) From: "Tony Schwartz" To: , "'Jay Hill'" Subject: RE: Need a way to set a result limit on a particular field Date: Tue, 14 Jun 2005 20:11:46 -0400 Message-ID: <002101c5713e$d22fdbb0$0202a8c0@graphite> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I don't see a way to do this today. How many different hosts are there? If it's small, you could execute the query that many times only grabbing the top 3 results from each. Otherwise, you'll have to use brute force with a HitCollector and read the field for each doc. Good luck! Tony Schwartz tony@simpleobjects.com -----Original Message----- From: Jay Hill [mailto:jayallenhill@gmail.com] Sent: Tuesday, June 14, 2005 7:23 PM To: java-user@lucene.apache.org Subject: Need a way to set a result limit on a particular field I have a need to limit my Hits returned based on one of the indexed fields. This is a web application and we want to limit the number of hits from any one host. We have a field named "host_id" and I'd like to be able to limit my results to no more than three results for any one host_id. Any help is appreciated. Thanks, -Jay --------------------------------------------------------------------- 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