lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Louvard <>
Subject TooManyClauses with MultiTermQueries
Date Fri, 03 Nov 2006 16:35:48 GMT
Hello, in working with Lucene since several years.
One of my biggest problem was the unability of lucene to search with 
wildcard. Also I have develop my own MultiTermQueries.

Now there's a standard class for this, but you'll allways become an 
exception if your search is to generic, 'a*' for exemple.
I can't solve this problem, but I making it acceptable with the follwing 
- getting all possible terms.
- sort them (actualy with the length difference beetween search term (if 
you search 'TooMany*' then 'TooManyDog' has a better range than 
- get the allowed (I want my BooleanQuery not to overwrite 100 terms for 
- search this.

 for this Query I can call call:
.getWarnnigs() give me a string with a description of the limitation 
("Have found 265654 terms for you search please be more precise.")
.getTermsList() the list of all searched terms (usefull too for the user).

So I can allways have a result. Mostly, with the sorting I am getting 
the searched term (You can use another sort). I can limit maxClauseCount 
to few values (avoid out of memory and better performance).

Hope this can help someone. I think it would be a nice feature to 
implements in lucene.

PS: sorry for my poor english.

Mit freundlichen Grüßen

i. A. Éric Louvard
HAUK & SASKO Ingenieurgesellschaft mbH
Zettachring 2
D-70567 Stuttgart

Phone: +49 7 11 7 25 89 - 19
Fax: +49 7 11 7 25 89 - 50

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

View raw message