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 Eric Louvard <er...@hauk-sasko.de> on 2006/11/03 17:35:48 UTC
TooManyClauses with MultiTermQueries
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: eric.louvard@hauk-sasko.de
www: www.hauk-sasko.de
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: TooManyClauses with MultiTermQueries
Posted by Silvy Mathews <sm...@funmobility.com>.
Hi All,
I also need to resolve this issue. What is the best way to catch this exception?
Thanks
Mathews
-----Original Message-----
From: Eric Louvard [mailto:eric.louvard@hauk-sasko.de]
Sent: Friday, November 03, 2006 8:36 AM
To: java-user@lucene.apache.org
Subject: TooManyClauses with MultiTermQueries
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: eric.louvard@hauk-sasko.de
www: www.hauk-sasko.de
---------------------------------------------------------------------
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