Hi Teko, sure - I use Lucene though elasticsearch, but I suppose that doesnt make a difference in this situation. I needed something like what you were trying to accomplish - basically to search any substring... wildcarded queries worked but were kind of slow.
This is my analyzer that works for me perfectly: "settings" : { "analysis" : { "analyzer" : { "default" : { "type" : "custom", "filter" : ["icu_folding"], "tokenizer" : "nGram" } }, "tokenizer": { "nGram" : { "type" : "nGram", "min_gram" : 2, "max_gram" : 20, "token_chars" : ["letter", "digit", "punctuation", "symbol"] } } } }, it basically indexes any substrings made of letters, digits, punctuation and symbols of length 2..20. but if that previous solution works for you, that's good :) 2014-05-14 20:23 GMT+02:00 teko <tec...@gmail.com>: > *Emanuel Buzek, > > Can you explain how you use NGram?? Did you create a Analyzer? is it?? > Sorry, but, I really don't have a great knowledge about Lucene... > > Thank advance! > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/SOLVED-How-to-locate-a-Phrase-inside-text-like-a-Browser-text-searcher-tp4135075p4135607.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Emanuel Buzek Software Engineer, ROKE.cz <http://www.roke.cz> tel: +420 776 54 26 26