I'm running an Elasticsearch server.
I'd like a query such as fifty two meters
to match a document containing 52 meters
.
Is there any plugin (filter or analyzer) that converts number words to arabic numerals?
Currently there is no plug-in for elasticsearch to convert words to number.
I suggest you to create a code that gets raw query as an input and outputs the transformed the query (i.e: convert words to number) for elasticsearch.
You can use this ruby gem (open-source) to convert words to number and vice versa.
NumbersInWords.in_numbers("nineteen sixty five") 1965
And to make things easier ruby intergration for elasticsearch can used to finally query the elasticsearch and get the results.
require 'elasticsearch'
client = Elasticsearch::Client.new log: true
client.transport.reload_connections!
client.cluster.health
client.search q: 'test'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With