Hi Erik I think the best solutuion is to have a NullAnalayzer class that allows a simple pass through
The query parser then can be passed with a PerFieldAnalayzer that knows when to select NullAnalayzer or some other based on the Field:"data... " Field2:"pp" format this is something that the query parser is already geared up to do regards Rupinder >-----Original Message----- >From: Erik Hatcher [mailto:[EMAIL PROTECTED] >Sent: 20 October 2004 16:29 >To: Lucene Users List >Subject: Re: Null or no analyzer > > > >On Oct 20, 2004, at 9:55 AM, Aviran wrote: >> AFIK if the term "Election 2004" will be between quotation marks this >> should >> work fine. > >No, it won't. The Analyzer will analyze it, and the WhitespaceAnalyzer >would split it into two tokens [Election] and [2004]. > >This is a tricky situation with no clear *best* way to do this sort of >thing. However, given what I've seen of this thread so far I'd >recommend using the PerFieldAnalyzerWrapper and associate the fields >indexed as Field.Keyword with a KeywordAnalyzer. There have been some >variants of this posted on the list - it is not included in the API, >however perhaps it should be. Or perhaps there are other options to >solve this recurring dilemma folks have with Field.Keyword indexed >fields and QueryParser? > > Erik > > > >> >> Aviran >> http://aviran.mordos.com >> >> -----Original Message----- >> From: Morus Walter [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, October 20, 2004 2:25 AM >> To: Lucene Users List >> Subject: RE: Null or no analyzer >> >> >> Aviran writes: >>> You can use WhiteSpaceAnalyzer >>> >> Can he? If "Elections 2004" is one token in the subject field >> (keyword), >> this will fail, since WhiteSpeceAnalyzer will tokenize that to >> `Elections' >> and `2004'. >> So I guess he has to write an identity analyzer himself unless there >> is one >> provided (which doesn't seem to be the case). The only alternatives >> are not >> using query parser or extending query parser for a key word syntax, as >> far >> as I can see. >> >> >> >> >> --------------------------------------------------------------------- >> 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]