lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Leading wildcard query
Date Fri, 28 Jul 2006 18:01:32 GMT
You could form a filter, using the WildCardTermEnum or RegExTermEnum and
then use the filter with a ConstantScoreQuery. You lose relevancy, but
relevancy is an ambiguous concept with wildcards anyway.

Using the query parser with a leading wildcard, even if enabled, is almost
sure to give you a "TooManyClauses" exception unless your index is very,
very, very small. There's a thread I started on the list titled "I just
don't get wildcards at all" in which the guys generously gave me a tutorial
in what wildcards are all about. I suspect you'd find it interesting.....
You might also want to search the archive for any TooManyClauses since this
has been discussed several times.....

Best
Erick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message