Of course you can do the inverse of what Erik said. That is search for a term that you know is not in the index and use the NOT operator.
Andrew -----Original Message----- From: Erik Hatcher <[EMAIL PROTECTED]> Sent: Jul 27, 2005 10:49 AM To: java-user@lucene.apache.org Subject: Re: Quick newbie question On Jul 27, 2005, at 11:07 AM, Federico Tonioni wrote: > Hi all! > I have just a simple question > > How can I retrieve all documents in an index by using QueryParser? > I thought > > Query query = QueryParser.parse("*", "contents", > new StandardAnalyzer()); > > might be the solution, but it's not:) In general, you can't. Many have used a technique of indexing a single field with the same value for all documents and done a query for field:value to find all documents. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Andrew Boyd Software Architect Sun Certified J2EE Architect B&B Technical Services Inc. 205.422.2557 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]