Re: Appropriate analyzer

2009-04-28 Thread Chris Hostetter
: try to use RegexQuery Except that his input string is longer then the terms he wants to match on. It sounds like what you are looking for is essentially a simplified use case of the "longest matching sub-phrase" problem... http://www.nabble.com/Dictionary-lookup-possibilities-to22977277.ht

Re: Appropriate analyzer

2009-04-22 Thread Erick Erickson
*If* your terms are simple (that is, not wildcarded), you may get some joy from TermEnum. The idea here would be to find the longest term *already in your index* that satisfies your need and use that to form a simple TermQuery Essentially using TernEnum.skipTo on successively shorter strings u

Re: Appropriate analyzer

2009-04-21 Thread AlexElba
ple: > > In index we've: abc, abcdef, xyz > When search on abcdefgh the most relevant result should be abcdef, while > searching on abcde the best one is abc. > > Thanks. > > Sincerely, > Artyom Sokolov > > -- View this message in context: http://www.nab

Appropriate analyzer

2009-04-21 Thread Artyom Sokolov
Hello. Currently I'm trying to find something like an analyzer to solve the problem. Actually, what I need is next: search on a query string step-by-step, trimming last char on each step. Small example: In index we've: abc, abcdef, xyz When search on abcdefgh the most relevant result should be a