Search in more than 1 index

Hello,
I try to search with year of birth a name in elasticsearch but when I try it, it show me total 0.
It's not the first time that my query print total 0

PUT person/delivery/EYYwE2QBbKQAAZyeN3Yb
{
 "yearOfBirth": ["1995", "2001"], 
  "names": ["John", "Phil"],
  "dateOfBirth": {
    "John": "1995",
    "Phil": "2001"
  }

}



POST person/deliver/_search
{
  "query": {
    "range": {
      "dateOfBirth": {
        "lte": "1995",
        "format": "yyyy"
      }
    }
  }
}

and what it print

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 0,
    "max_score": null,
    "hits": []
  }
}

Thank for helping

PUT person/delivery/EYYwE2QBbKQAAZyeN3Yb
POST person/deliver/_search

Maybe this?

Thank you LesioS and shame on me :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.