You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Federico Tonioni <Fe...@isti.cnr.it> on 2005/07/27 17:07:06 UTC
Quick newbie question
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:)
thanks in advance
fede
--
---------------------------------------------------------------------------------------------------
Federico Tonioni
Email1: Federico.Tonioni@isti.cnr.it
Email2: Federico.Tonioni@iet.unipi.it
Tel. : +39 339 3741340
Istituto di Scienza e Tecnologie dell'Informazione "Alessandro Faedo"
Networked Multimedia Information Systems (NMIS) Laboratory
Area della Ricerca CNR di Pisa
Via G. Moruzzi 1 56124 PISA - Italy
-------------------------------------------------------------------------------------------------------
Re: Quick newbie question
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org