See below.... On 5/12/07, Mark Miller <[EMAIL PROTECTED]> wrote:
Paul Taylor wrote: > I seem to be having problems using a * in a phrase term query > > This is my search String, its not finding any matches > 54:"MusicIP PUID*" > > If I match on a particular record it works ok > 54:"MusicIP PUIDa39494bf-927e-1638-fb06-782ec55ac22d" > "MusicIP PUID*" means to search for MusicIP within one of PUID*...I am pretty sure that KeywordAnalyzer does not split on whitespace like WhiteSpaceAnalyzer does...
Perhaps not like whitespaceanalyzer does in all cases, but this code QueryParser qp = new QueryParser("field", new WhitespaceAnalyzer()); Query q = qp.parse("Does this tokenize*"); System.out.println(q.toString()); produces field:Does field:this field:tokenize* while this code QueryParser qp = new QueryParser("field", new KeywordAnalyzer()); Query q = qp.parse("Does this tokenize*"); System.out.println(q.toString()); Produces: field:Does field:this field:tokenize* The only difference is using KeywordAnalyzer rather than WhitespaceAnalyzer. I sure don't see the difference, and it's puzzled me on and off. Erick which means that MusicIP is never within one
of PUID*..."MusicIP PUIDa39494bf-927e-1638-fb06-782ec55ac22d" is one whole token. - Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]