-1

Hi I am trying to use wildcard on key inside of my query. Because I have arrays in my data so I am saving my data in flat form. Like obj_0_id, obj_1_ID and so on. So is there any way to write something like this obj_*_ID:123 Thank you

9me
  • 1,078
  • 10
  • 36

1 Answers1

0

You can use query_string which lets you specify wildcards on field names. Example from docs:

{
    "query_string" : {
        "fields" : ["city.*"],
        "query" : "this AND that OR thus",
        "use_dis_max" : true
    }
}
alpert
  • 4,500
  • 1
  • 17
  • 27