: terms (i.e the words) inverted, i mean, for example i need the word : "horse" to be stored as "esroh" because in my application i need to find : all the words in the index that end in an specific suffix.
: I thought in inverting the files before indexing it but it would : increase the time complexity of the program. Ouch. Please don't do that. It hurts my brain just to think about it. This is the kind of problem TokenFilters were invented for. you can write one that reverses the tokenText in the token it's recieved on the TokenStream. you can index the text in two fields (forwards and backwords) or if you want the reversed versions of the terms in the same field as the "forward" versions, then your TokenFilter can echo the orriginal Token, and then output your reversed versions with the same positionIncriment (to keep phrases working) .. but if you don't want people looking for "god" complaining about all the "dog" results they get, i would preface all of your reversed tokens with some character that your tokenizer would normally strip out -- and when you detect that the user is doing a suffiz search, prepend it to the reversed string ie: new PrefixQuery(new Term(fieldName,"_esr")); -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]