Hi Apologies.......
Given a Search word = 'erik OR hatcher AND otis OR gospodnetic' , Is it possible to RETURN COUNT occurances for each of the word with in the Searched documents. This would give me the Each word's Term Frequency. How to achieve this Thx in advance karthik -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Monday, July 18, 2005 6:39 PM To: java-user@lucene.apache.org Subject: Re: BOOLEAN OPERATOR HOWTO On Jul 18, 2005, at 8:12 AM, Karthik N S wrote: > I have 2 Questions. But there were no question marks! I don't understand your questions at all, sorry, but I'll see if I can decipher it somewhat.... > 1) The Search Criteria src requires to automatically fill " " > between Search words with a Boolean Operator " AND ". You mean to achieve AND'd clauses? By default, OR is the operator, and AND must be explicit. You can construct a QueryParser instance and set the default operator to AND, though, and then OR must be explicit. > 2) The Search Criteria src requires to automatically recognise > the existing Boolean Query ' AND , + ' present and append the same > with out any manupulations. > > Ex : - > Search Word = > > 'Lucene in Action Erik hatcher and Otis + Gospodnetic ' = > lucene AND action AND Eric AND hatcher AND otis + gospodnetic . > > > How to Achieve this , Is there any mechanism built into Lucene to > handle such situations. Yes, this sounds like the default operator is what you're looking for. Since you use "Lucene in Action" as an example, flip to page 94 for more discussion on this, and then flip to the other pages mentioned here: http://www.lucenebook.com/search?query=default+operator Erik --------------------------------------------------------------------- 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]