NumberFormatException when using regex filter with int field

Hello,
I am using ES Java api to run queries against ES. I have a field in ES
which has int data. When I run regex filter on that field im getting number
format exception.
Can't we use regex with numbers? is it only for string fields?
Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4f797a64-273b-468e-af66-05063c5e982d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yes. copy the int field value to a string field with copy_to or manually.

Am Donnerstag, 8. Januar 2015 09:56:40 UTC+1 schrieb AK:

Hello,
I am using ES Java api to run queries against ES. I have a field in ES
which has int data. When I run regex filter on that field im getting number
format exception.
Can't we use regex with numbers? is it only for string fields?
Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c58c0d9a-0bb3-428d-9fa2-4ad45e662e14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.