Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Solr, mail # user - search for alphabetic version of numbers


Copy link to this message
-
Re: search for alphabetic version of numbers
Chris Hostetter 2012-06-19, 15:50

: 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?

the lucene test-framework actualy contains a class named
org.apache.lucene.util.English which can convert int->String in english
text.

You could try wrapping that up in a TokenFilter?

-Hoss