Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 84046 invoked from network); 23 May 2006 21:38:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 May 2006 21:38:33 -0000 Received: (qmail 48380 invoked by uid 500); 23 May 2006 21:38:27 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 48352 invoked by uid 500); 23 May 2006 21:38:27 -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 48340 invoked by uid 99); 23 May 2006 21:38:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 14:38:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.28.230.86] (HELO mail.shadowtv.com) (66.28.230.86) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 14:38:26 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Subject: Removing search results that fall within a time range Date: Tue, 23 May 2006 17:38:04 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Removing search results that fall within a time range Thread-Index: AcZ+qx/6NzPLNJOGTlyNLkXLfN5aNwABCWOw From: "Benjamin Stein" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I have a requirement to only return one result for all documents whose timestamps fall within N seconds of one another. (where timestamp is a field and N is an integer). For example, Document A is timestamped "12:00:00" and Document B has timestamp "12:00:30", Document B should be discarded. On the other hand, if Document B has timestamp "12:01:00" then I should return both (assuming 30 < N < 59 seconds). =20 Similarly, if Documents A, B, and C have timestamps "12:00:00", "12:00:30", and "12:01:00" respectively, only Document A should be returned (because B is close to A, and C is close to B). If it helps to simplify things, we can assume results are sorted by time. Also, I can apply logic at index time or at search time. =20 Any suggestions? This is a pretty tough concept to search the archives for... --Ben --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org