Thanks to Otis, Morus, and Erik for their responses to my question. I see that my question is also related to the posting: "Query syntax on Keyword field question".
I tried all of your suggestions. When using: a) the tokens generated by the analyzer and b) the parsed query (using the to_string method). to debug StandardAnalyzer, I saw that it does properly pass in the string with the number attached to it. I don't understand why Field.Text did not work with StandardAnalyzer. I tried WhitespaceAnalyzer and that did not work. I have tried implementing a custom analyzer like KeywordAnalyzer, and using PerFieldAnalyzerWrapper. I think the custom analyzer I created is not properly doing what a KeywordAnalyzer would do. Erik, could you please post what KeywordAnalyzer should look like? I can't wait until the book you guys are developing comes out. Thanks very much. Morris -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Saturday, March 13, 2004 3:14 AM To: Lucene Users List Subject: Re: Zero hits for queries ending with a number On Mar 13, 2004, at 6:02 AM, Morus Walter wrote: > Otis Gospodnetic writes: >> Field.Keyword is suitable for storing data like Url. Give that a try. >> > Hmm. I don't think keyword fields can be used with query parser, > which is probably one of the problems here. > He did try keyword fields. Look in the archives for KeywordAnalyzer (custom).... and PerFieldAnalyzerWrapper (built-in).... using a combination of these you can use keyword fields. Or, first try just using WhitespaceAnalyzer. It is almost always the analyzer that is the cause of confusion - folks just get lulled into forgetting about its role because Lucene is so easy to use... until this type of issue bites you. It is a wacky combination though - and notorious for causing confusion. Perhaps someone could create a wiki page for this scenario where we can flesh out examples/solutions? 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]