lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brisbart Franck <>
Subject Re: how to get all terms as search results (or "*" equivalent)
Date Mon, 28 Jun 2004 14:24:37 GMT
When you use wildcards like that, the parser builds 1 query for each 
term matching the wildcarded term. With this approach, it should have 
created n queries (ie n boolean clauses) where n is number of terms.
The number of clauses for a BooleanQuery is limited to 1024 by default.
You can change this value to a higher one, but it's not very great.

For my own use, I created a 'AllQuery' which return all the non-deleted 
documents with a score of 1
This is also very useful to search queries like 'field1:not word' (the 
documents which doesn't contain 'word')
I needed this class only for debugging purpose so I didn't work a lot on 
it and it'll be better to write it on your own to have something clean.


Polina Litvak wrote:
> Since it is not allowed to use "*" or "?" symbols as the first character
> of a search, I tried the following query as an alternative:
> "Field_1: ([a* TO z*] OR [A* TO Z*] OR [0* TO 9*])"
> but the QueryParser complains saying:
> "$TooManyClauses".
> Any idea why this approach does not work and how to get all terms in an
> index when doing search ?
> Thanks,
> Polina

Franck Brisbart

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message