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 allgorithm:
- 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 'TooManyClauses')). - get the allowed (I want my BooleanQuery not to overwrite 100 terms for example).
- 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
E-Mail: [EMAIL PROTECTED]
www: www.hauk-sasko.de





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to