Hi Patrick I did as Erik replied in his mail , and searched for the complete word "\"New Year\"" , but the QueryParser Still returns me hit for "Year" Only.
[ The Analyzer I use has 555 English Stop words with "new" present in it ] That's when I checked up with Analyzer's to verify, If u look at the list Analyzer's o/p GrammerAnalyzer is the one that has 555 English STOPWORDS. Do u think this is the bug in my Code. Thx Karthik -----Original Message----- From: Patrick Burleson [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 6:55 PM To: Lucene Users List Subject: Re: AnalyZer HELP Please Karthik, What you would want to do with the split tokens ( "New" and "Year" ) is then create a PhraseQuery containing a Term object for each token. This should do what you want. As Erik said, QueryParser would have done this internally, only if you actually sent in the quotes...not just "New Year", but "\"New Year\"". Patrick On Tue, 17 Aug 2004 18:53:01 +0530, Karthik N S <[EMAIL PROTECTED]> wrote: > Hi > > Erik > > Apologies....... > > What I ment to Say was, a word such as "New Year" (Quotes means "\"" ) > on QueryParser.parse(word, "contents", analyzer) should return me hits > for the full word, > but it did not. > > So when I did a quick run on Analyzer process and > found that it was splitting the Word > > "New Year" = [New] [Year] > > Am I doing some thing wrong in here.... > > Thx in advance..... > Karthik > > > > -----Original Message----- > From: Erik Hatcher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 17, 2004 6:18 PM > To: Lucene Users List > Subject: Re: AnalyZer HELP Please > > This is what analyzers do. I don't know of any analyzer that deals > with quotes in the way you're requesting, by keeping the contents > together as a complete token. You'll have to write your own variant > that does this. > > QueryParser, however, uses quotes to denote a phrase query, and will > query for the words together. Perhaps this is sufficient for your > needs? > > Erik > > On Aug 17, 2004, at 8:40 AM, Karthik N S wrote: > > > > > Hey Guys..... > > > > Apologies...... > > > > > > Some small Help needed > > > > When I Run the Analyzer's for the word "New Year" (with Quotes) on > > Lucene1-4 final.jar on win 2k O/s > > Why is the SimpleAnalyzer splitting it into 2 words ??? > > > > or > > > > > > am i missing something in here...... > > > > > > > > Analzying " New Year " > > org.apache.lucene.analysis.WhitespaceAnalyzer: > > > > ["] [New] [+] [Year] ["] > > > > org.apache.lucene.analysis.SimpleAnalyzer: > > > > [new] [year] > > > > org.apache.lucene.analysis.StopAnalyzer: > > > > [new] [year] > > > > org.apache.lucene.analysis.standard.StandardAnalyzer: > > > > [new] [year] > > > > com.controlnet.indexing.analyzers.GrammerAnalyzer: > > > > [year] > > > > > > > > > > > > WITH WARM REGARDS > > HAVE A NICE DAY > > [ N.S.KARTHIK] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]