# Share a document across multiple indices

**URL:** <https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123>\
**Category:** Elasticsearch\
**Created:** [June 16, 2014, 1:51am UTC](https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123 "2014-06-16T01:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Angers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martin_angers/32/1476_2.png) [@Martin\_Angers](https://discuss.elastic.co/u/Martin_Angers)\
**Post date:** [June 16, 2014, 1:51am UTC](https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123/1 "2014-06-16T01:51:45Z")

</div>

Hi,

I'm wondering if this is a supported scenario in ElasticSearch, reading the  
guide and API reference I couldn't find a way to achieve this.

I'd like to index documents only once, say in a master index, and then  
create secondary or "meta" indices that would only contain a subset of the  
master index.

For example, document A, B and C would be indexed once in the master index.  
Then a secondary index would be able to see only documents A and B, while  
another secondary index could see only documents B and C, etc. (and by  
"see" I mean the search queries should only consider those documents)

The idea being that documents could be relatively big, and they should not  
be indexed multiple times.

Does that make sense? Am I missing "the right way" to design such a  
pattern? I am new to ES.

Thanks,  
Martin

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2014, 2:05am UTC](https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123/2 "2014-06-16T02:05:05Z")

</div>

This isn't something that can be done natively in ES.

You could however have index A, B and C that you can apply a replication  
factor to, then use aliases to group them into logical units.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 16 June 2014 11:51, Martin Angers [martin.n.angers@gmail.com](mailto:martin.n.angers@gmail.com) wrote:

> Hi,
> 
> I'm wondering if this is a supported scenario in Elasticsearch, reading  
> the guide and API reference I couldn't find a way to achieve this.
> 
> I'd like to index documents only once, say in a master index, and then  
> create secondary or "meta" indices that would only contain a subset of the  
> master index.
> 
> For example, document A, B and C would be indexed once in the master  
> index. Then a secondary index would be able to see only documents A and B,  
> while another secondary index could see only documents B and C, etc. (and  
> by "see" I mean the search queries should only consider those documents)
> 
> The idea being that documents could be relatively big, and they should not  
> be indexed multiple times.
> 
> Does that make sense? Am I missing "the right way" to design such a  
> pattern? I am new to ES.
> 
> Thanks,  
> Martin
> 
> --  
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/26ea7107-9554-43d8-b492-4d4357fa5af7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624aFs-G5i\_Th7p-\_aY065rsrRxSjxb6BzCKc\_%3DO5LtKuqA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624aFs-G5i_Th7p-_aY065rsrRxSjxb6BzCKc_%3DO5LtKuqA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Martin\_Angers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martin_angers/32/1476_2.png) [@Martin\_Angers](https://discuss.elastic.co/u/Martin_Angers)\
**Post date:** [June 16, 2014, 9:08pm UTC](https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123/3 "2014-06-16T21:08:30Z")

</div>

Thanks, I'll explore your suggestion.

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4fae0814-4577-44ae-b4ac-e8938a4b87ae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4fae0814-4577-44ae-b4ac-e8938a4b87ae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:21am UTC](https://discuss.elastic.co/t/share-a-document-across-multiple-indices/18123/5 "2017-07-06T01:21:49Z")

</div>


