try to use the lucene wildcard. *John*Mail* The analyzer is just how you want the segment terms on your index. the query parser is how you tokenize the terms that that you want to query against the index (something like that). But lucene allows you use the wild card to handle with "other cases" that your tokenizer cannot detect as a unique token.
Interesting question indeed, hope that this can help you. http://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Wildcard%20Searches ... On Thu, May 8, 2014 at 10:03 AM, teko <tec...@gmail.com> wrote: > Hi, someone can help me with it?? > I need do a search to locate a phrase inside text, but, I need locate this > phrase on texts like that: > 'John Mail' <- phrase I want locate > ' Good Morning John Mail how are you? ' < I need find this phrase here > ' Good MorningJohn Mail how are you? ' < here too > ' GoodMorning John Mailhow are you? ' < and here > > I tried using with 'WhiteSpaceAnalyzer' and 'QueryParser'... but not work > (locate just in the first sample above... but not the others) > > Please, I really need help with it! > Thanks (note: Sorry my english!! xD) > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-locate-a-Phrase-inside-text-like-a-Browser-text-searcher-tp4135075.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 > >