lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <>
Subject Re: *term search
Date Wed, 08 Sep 2004 10:48:05 GMT
sergiu gordea writes:
>  Hi all,
> I want to discuss a little problem, lucene doesn't support *Term like 
> queries.
> I know that this can bring a lot of results in the memory and therefore 
> it is restricted.
That's not the reason for the restriction. That's possible with a* also.
The problem is, that lucene has to check all terms to see if they end
with Term. That makes the performance pretty poor.
A prefix allows to restrict the search on words with this prefix 
efficiantly, since the wordlist is orderd.
>  So my question is if there is a simple solution for implementing the 
> funtionality mentioned above.
Just follow the way, wildcard query is implemented.

Actually I'm not sure if the restriction you mention is in the wildcard
query itself or only in the query parser. In the latter case, you might
just create the query yourself.

A better way for postfix queries is to create an additional search field
where all words are reversed and search for mreT* on that field.

Depends on the size of your index, how important such an optimization is.


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

View raw message