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. Sure. 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. Morus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
