I'm a twit. How about PhraseQuery? From the Javadoc....
A Query that matches documents containing a particular sequence of terms. A PhraseQuery is built by QueryParser for input like "new york". You can also add phrase queries to a BooleanQuery. Best Erick On 8/21/06, Rupinder Singh Mazara <[EMAIL PROTECTED]> wrote:
nope that does not really help i end up with the same result query entered:"red hat" ( without the quotes ) results in FULLTEXT:red FULLTEXT:hat AND KEYWORD:red KEYWORD:hat Erick Erickson wrote: > I think you can use this form > *QueryParser< file:///C:/lucene-2.0.0/docs/api/org/apache/lucene/queryParser/QueryParser.html#QueryParser%28java.lang.String,%20org.apache.lucene.analysis.Analyzer%29 > > > *(String <http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html> f, > Analyzer< file:///C:/lucene-2.0.0/docs/api/org/apache/lucene/analysis/Analyzer.html> > > a) where the analyzer is a PerFieldAnalyzerWrapper. Then use the same > analyzer you used during the indexing process. > > This is Lucene 2.0... > > Best > Erick > > > On 8/21/06, Rupinder Singh Mazara <[EMAIL PROTECTED]> wrote: >> >> hi all >> >> I need to be able to index and search for documents based on keywords >> that are attached to a document. >> >> Some of the keywords have white spaces in them like "red hat" or >> "place of worship" , >> >> I need to able to search for FULLTEXT:"red hat" AND KEYWORD:"red hat" >> >> >> For indexing purposes I was able to construct a NullTokenizer based on >> the lucene mailling lists but the query parse seems to intent on >> splitting any search term. Apart from writing my own parser is there any >> way so as not to get FULLTEXT:red FULLTEXT:hat AND KEYWORD:red >> KEYWORD:hat >> >> thanks >> >> >> >> --------------------------------------------------------------------- >> 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]