Share a document across multiple indices

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

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
web: www.campaignmonitor.com

On 16 June 2014 11:51, Martin Angers 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.
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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit 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.

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

Will aliases help you in this case ?

For example :
index1 : [doc1]
index2 : [doc2]

Create an alias "Docs" for index1 and index2

The run queries against the alias?

On Monday, June 16, 2014 3:51:45 AM UTC+2, Martin Angers 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3ab9180d-6af9-45d4-8b2c-22f32869ee2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.