# Searching multiple indexes and types issue

**URL:** <https://discuss.elastic.co/t/searching-multiple-indexes-and-types-issue/3077>\
**Category:** Elasticsearch\
**Created:** [July 7, 2010, 10:56pm UTC](https://discuss.elastic.co/t/searching-multiple-indexes-and-types-issue/3077 "2010-07-07T22:56:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Doyle](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Samuel\_Doyle](https://discuss.elastic.co/u/Samuel_Doyle)\
**Post date:** [July 7, 2010, 10:56pm UTC](https://discuss.elastic.co/t/searching-multiple-indexes-and-types-issue/3077/1 "2010-07-07T22:56:29Z")

</div>

Hello,

It appears that your fields you are searching for across multiple indexes  
and types needs to exist in each of the indexes being searched against?

If I try to search for a field name foo in both index A and B but only A has  
it I end up getting a Shard Failure, here is an example of an error:

2010-07-07 15:36:02,800 [http-localhost%2F127.0.0.1-8084-1] ERROR  
search.SearchService - shard  
[[aa452a3a-0201-461f-952d-a41d44d3e375][backstage][2]], reason  
[RemoteTransportException[[Tana Nile][inet[/]][search/phase/query/id]];  
nested: QueryPhaseExecutionException[[backstage][2]: query[field1:tim  
field2:tim field3:tim field4:tim field5:tim field6:tim  
field7:tim],from[0],size[1]: Query Failed [Failed to execute main query]];  
nested: ]

Is this something that should be possible?

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 8, 2010, 8:20am UTC](https://discuss.elastic.co/t/searching-multiple-indexes-and-types-issue/3077/2 "2010-07-08T08:20:54Z")

</div>

It might be that ES is too restrictive in some cases, can you send me the  
query you execute?

-shay.banon

On Thu, Jul 8, 2010 at 1:56 AM, Samuel Doyle [samueldoyle@gmail.com](mailto:samueldoyle@gmail.com) wrote:

> Hello,
> 
> It appears that your fields you are searching for across multiple indexes  
> and types needs to exist in each of the indexes being searched against?
> 
> If I try to search for a field name foo in both index A and B but only A  
> has it I end up getting a Shard Failure, here is an example of an error:
> 
> 2010-07-07 15:36:02,800 [http-localhost%2F127.0.0.1-8084-1] ERROR  
> search.SearchService - shard  
> [[aa452a3a-0201-461f-952d-a41d44d3e375][backstage][2]], reason  
> [RemoteTransportException[[Tana Nile][inet[/]][search/phase/query/id]];  
> nested: QueryPhaseExecutionException[[backstage][2]: query[field1:tim  
> field2:tim field3:tim field4:tim field5:tim field6:tim  
> field7:tim],from[0],size[1]: Query Failed [Failed to execute main query]];  
> nested: ]
> 
> Is this something that should be possible?
> 
> Thanks

---

<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 6, 2017, 4:22am UTC](https://discuss.elastic.co/t/searching-multiple-indexes-and-types-issue/3077/3 "2017-07-06T04:22:31Z")

</div>


