Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 90762 invoked from network); 13 Aug 2004 19:36:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Aug 2004 19:36:24 -0000 Received: (qmail 27687 invoked by uid 500); 13 Aug 2004 19:36:17 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 27605 invoked by uid 500); 13 Aug 2004 19:36:16 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 27592 invoked by uid 99); 13 Aug 2004 19:36:16 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [206.162.161.114] (HELO exmtl01.nstein.com) (206.162.161.114) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 13 Aug 2004 12:36:13 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6556.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Finding All? Date: Fri, 13 Aug 2004 15:36:11 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Finding All? Thread-Index: AcSBaz1BUWYe4FALS5Cj3qGviR0ymAAAPZ7w From: "Tate Avery" To: "Lucene Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I had to do this once and I put a field called "all" with a value of = "true" for every document. _doc.addField(Field.Keyword("all", "true")); Then, if there was an empty query, I would substitute it for the query = "all:true". And, of course, every doc would match this. There might be a MUCH more elegant solution, but this certainly worked = for me and was quite easy to incorporate. And, it appears to order the = documents by the order in which they were indexed. T p.s. You can probably do something using IndexReader directly... but the = nice thing about this approach is that you are still just using a simple = query. -----Original Message----- From: Patrick Burleson [mailto:pburleson@gmail.com] Sent: Friday, August 13, 2004 3:25 PM To: Lucene Users List Subject: Finding All? Is there a way for lucene to find all documents? Say if I have a search input and someone puts nothing in I want to go ahead and return everything. Passing "*" to QueryParser was not pretty. Thanks, Patrick --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org