It depends upon your analyzer during both index and search operations.
WhitespaceAnalyzer would do nothing to your string, and you'd have "jakarta&apache". StandardAnalyzer would give you two terms, "jakarta" and "apache" and at query time this would be either jakarta AND apache or jakarta OR apache, depending on what the default operator is. and phrase search is something else again. that is, a PhraseQuery with the term "jakarta apache" would only match the two words if they were right next to each other. You'll get a lot more and better help if you tell us what analyzers you're using <G>... Erick On 3/11/07, ruchi thakur <[EMAIL PROTECTED]> wrote:
am sorry , guess "*" caused confusion. My question is that, using jakarta&apache am able to search for jakarta apache, but was confused as no reference to this query String(jakarta&apache) could find anywhere on net. So just wanted to make sure if jakarta&apache -> jakarta apache like "jakarta apache" -> jakarta apache ie; jakarta&apache seaches for phrase jakarta apache Regards, Ruchi On 3/11/07, Doron Cohen <[EMAIL PROTECTED]> wrote: > > "ruchi thakur" <[EMAIL PROTECTED]> wrote on 10/03/2007 19:32:14: > > > does that mean* jakarta&apache* should search for * jakartaapache* > > I assume '*' here is for emphasizing the query text, - this is somewhat > confusing because '*' is part of Lucene's query syntax for wildcard > search. > To the question - usually no, but it depends. You could write an analyzer > that would emit a token jakartaapache for input of jakarta&apache though > my > guess is that this is not the case, and jakarta&apache and jakartaapache > are two distinct words in your index. See the Lucene FAQ, in particular " > Why am I getting no hits / incorrect hits?", starting with its > recommendation to examine query.toString(). > > Hope this helps, > Doron > > > But using *jakarta&apache* am able to search for *jakarta apache* , but > was > > confused as no reference to this query String(jakarta&apache) could find > > anywhere on net. > > > > Regards, > > Ruchi > > On 3/8/07, Doron Cohen <[EMAIL PROTECTED]> wrote: > > > > > > Most likely the string jakarta&apache is analyzed as a single word, > > > both at indexing time and at search time. > > > > > > See also "AnalysisParalysis" in Lucene Wiki. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >