The regexp query or filter not working in my case.
Here my data
{ "index" : { "_index" : "map", "_type" : "item", "_id" : 1 }}
{ "name" : "New York", "combined" : "2014-BBBFFFBBBFFF" }
{ "index" : { "_index" : "map", "_type" : "item", "_id" : 2 }}
{ "name" : "London", "combined" : "2015-FFFFFBBBBFFFF" }
{ "index" : { "_index" : "map", "_type" : "item", "_id" : 3 }}
{ "name" : "Moscow", "combined" : "2014-FFFFFBBBBBBBBBB"}
{ "index" : { "_index" : "map", "_type" : "item", "_id" : 4 }}
{ "name" : "Sydney", "combined" : "2015-BBBBBBBBBBBBBBBB" }
My search query
{
"query": {
"regexp": {
"item.combined": "2014-b{3}f{3}*"
}
},
"from": 0,
"size": 25
}
to find the first entry, but is not working.
What i wnat to do is search in combined for a year and substr at position x
to position y with a f. Any character before or after positions can be any
character.
When i create a regex on http://regex101.com/ to find f in the string it
has this regex 2014-.{3}F{3}.* to match 2014-BBBFFFBBBFFF
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b7f2a8cb-8887-4d90-bbd6-9c32e1250c6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.