It would help a lot if you provided a couple of examples of inputs into your index and expected outputs for queries.
For instance, you say: <<<For example I need to search for "java de*" and recieve "java developers", "java development", "developed by java" et>>> But then in your follow-up you say <<<I have not tokenized phrases in index.>>> Well, if you haven't tokenized your input streams at index time and query time, you can't get what your first statement asks for. StandardAnalyzer, for instance tokenizes the input stream. If you use that at index time, you do, indeed, tokenize the phrases. That is, the analyzer does it for you. So, in order for us to help you, please provide: 1> the analyzers you use at index time (code snippets) 2> the analyzers you use at query time (code snippets) 3> example queries with expected responses 4> example input that corresponds to <3>. Or, a small, self-contained program (or unit test) that illustrates what you are trying to accomplish. Best Erick On Tue, Apr 15, 2008 at 2:25 AM, palexv <[EMAIL PROTECTED]> wrote: > > I have not tokenized phrases in index. > What query should I use? > Simple TermQuery does not work. > If I try to use QueryParser , what analyzer should I use? > > > > Daniel Naber-10 wrote: > > > > On Montag, 14. April 2008, palexv wrote: > > > >> For example I need to search for "java de*" and recieve "java > >> developers", "java development", "developed by java" etc. > > > > If your text is tokenized, this is not supported by QueryParser but you > > can > > create such queries using MultiPhraseQuery. If you don't tokenize a text > > like "java development" at whitespace characters, it's just like a > single > > term for Lucene. A query like "java de*" should work then, just make > sure > > you don't tokenize the search query either. > > > > Regards > > Daniel > > > > -- > > http://www.danielnaber.de > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Search-for-phrases-tp16678104p16695864.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >