lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mufaddal Khumri" <>
Subject RE: Escaping special characters
Date Thu, 07 Apr 2005 06:47:18 GMT
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?


-----Original Message-----
From: Chuck Williams [] 
Sent: Wednesday, April 06, 2005 11:39 PM
Subject: Re: Escaping special characters

Mufaddal Khumri writes (4/6/2005 11:21 PM):

>Am new to Lucene. I found the following page:
> At the
>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.


To unsubscribe, e-mail:
For additional commands, e-mail:

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:
For additional commands, e-mail:

View raw message