# Search in more than 1 index

**URL:** https://discuss.elastic.co/t/search-in-more-than-1-index/136327
**Category:** Elasticsearch
**Created:** [June 18, 2018, 3:10pm UTC](https://discuss.elastic.co/t/search-in-more-than-1-index/136327 "2018-06-18T15:10:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mkaczor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mkaczor/32/32352_2.png) [@mkaczor](https://discuss.elastic.co/u/mkaczor)
#### Post date: [June 18, 2018, 3:10pm UTC](https://discuss.elastic.co/t/search-in-more-than-1-index/136327/1 "2018-06-18T15:10:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![LesioS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lesios/32/32364_2.png) [@LesioS](https://discuss.elastic.co/u/LesioS)
#### Post date: [June 18, 2018, 3:12pm UTC](https://discuss.elastic.co/t/search-in-more-than-1-index/136327/2 "2018-06-18T15:12:10Z")

</div>

PUT person/deliver **y** /EYYwE2QBbKQAAZyeN3Yb  
POST person/deliver/\_search

Maybe this?

---

<div class="post-metadata">

### Author: ![mkaczor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mkaczor/32/32352_2.png) [@mkaczor](https://discuss.elastic.co/u/mkaczor)
#### Post date: [June 18, 2018, 6:41pm UTC](https://discuss.elastic.co/t/search-in-more-than-1-index/136327/3 "2018-06-18T18:41:45Z")

</div>

Thank you LesioS and shame on me 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 16, 2018, 8:32pm UTC](https://discuss.elastic.co/t/search-in-more-than-1-index/136327/5 "2018-07-16T20:32:22Z")

</div>

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