I have indexed the product names using the StandardAnalyzer and I store the product names as Field.Text. I suspect the StandardAnalyzer uses my hyphens as a token separator. What do I do to get around this problem? Can I tell StandardAnalyzer not to break on hyphens or should I be using some other Analyzer?
Thanks. -----Original Message----- From: Chuck Williams [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:39 PM To: java-user@lucene.apache.org Subject: Re: Escaping special characters Mufaddal Khumri writes (4/6/2005 11:21 PM): >Hi, > > > >Am new to Lucene. I found the following page: >http://lucene.apache.org/java/docs/queryparsersyntax.html. At the bottom >of the page there is a section that in order to escape special >characters one would use "\". > > > >I have an Indexer that indexes product names. Some product names have >"-" character in them. When I use my search class to search for product >names with - in them it wont find those products. > > How did you index those product names? I.e., if you used a tokenized field for the product names and an analyzer that breaks on the hyphens, then there are no hyphenated tokens for you to match. I would suggest using Luke to browse your index and see what you have. Chuck --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------------------ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. Consult your physician prior to the use of any medical supplies or product. ------------------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]