lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satuluri, Venu_Madhav" <Venu.Madhav.Satul...@deshaw.com>
Subject RE: Get All Entries
Date Mon, 27 Mar 2006 10:07:23 GMT
I believe there's a MatchAllDocsQuery class from Lucene 1.9 onwards. You
can run this query to get all documents.

If you are not using 1.9, to my knowledge, you would have to add a
redundant field that would true for all documents and query on that
field. Something like Field.Keyword("AllDocsTrue", "true") and add this
to your doc. You can run the query AllDocsTrue:true to get all your
docs.

Venu

-----Original Message-----
From: StefanH [mailto:Stefan.Hoepp@gemida.de] 
Sent: Monday, March 27, 2006 3:24 PM
To: java-user@lucene.apache.org
Subject: Get All Entries



Hello Everyone,

I have 6000 Entries in my Lucene DB and if I search for entries with
"00*"
in the Number-Field it works fine. But additional I must have alle
entries
no matter which number they have. A Term like "*" doesn't work. How can
I
get all entries?
The code of my search is:
			IndexSearcher is = new IndexSearcher( INDEX_DIR
);

			QueryParser parser = new QueryParser( "number",
analyzer);
			Query query = parser.parse("00*");
			
			Hits hits = is.search( query, new Sort("number")
);

Thanks for your help

Stefan H
--
View this message in context:
http://www.nabble.com/Get-All-Entries-t1348226.html#a3606783
Sent from the Lucene - Java Users forum at Nabble.com.


---------------------------------------------------------------------
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


Mime
View raw message