You can certainly do a modest number of special cases as replacement synonyms, but if you are serious about arbitrary number support, it might be best to go with a custom update processor and query preprocessor that map text numbers to simple numeric form.

How about cases like 2,300 or 2,300.00 (embedded commas or even decimal point) - two thousand three hundred or 23 hundred or twenty three hundred?

Or 200 million vs 200,000,000 vs. 200000000?

In any case, synonyms get really messy really quickly, but with preprocessors you can do whatever you want

-- Jack Krupansky

-----Original Message----- From: Alireza Salimi
Sent: Monday, June 11, 2012 2:41 PM
To: solr-user@lucene.apache.org
Subject: search for alphabetic version of numbers

Hi everybody,

I have the requirement to support searching for numbers with their
alphabetic or by digits.
For example, if we have a document with a field's value of '200',
if we search for "two hundred", that document should match.

I haven't found anything like this yet. Do we have other option than
define the most common numbers and their string versions as
synonyms?

Thanks


--
Alireza Salimi
Java EE Developer

Reply via email to