Multi-tenancy


(michaelgeis) #1

Hi,
I have difficulty finding documentation on how to apply multi-tenancy
to different types of objects in different indices.

I am familiar with searching multiple types in a single index, search
the video and article types in the media index:
curl -XGET http://localhost:9200/media/image,article/_search?q=

The multi-tenancy section on elasticsearch.org demonstrates searching
for objects of a single type across indices:
curl -XGET http://localhost:9200/kimchy,elasticsearch/tweet/_search?q=tag:warcraft

Is there a way to combine the two, i.e. search for multiple types
across multiple indices?

Given indices on localhost:9200/videos/video and localhost:9200/media
above, I'd like to be able to specify which types in those two indices
I want to cover in a single search. E.g. get article from media and
video in videos, but omit image in media.


(michaelgeis) #2

I guess I found my answer. Here is the link in case someone else
stumbles on this:
http://www.elasticsearch.org/guide/reference/api/search/indices-types.html

It suggests one may query multiple types OR multiple indices OR all
indices (for given type or even all types)
-- but not arbitrary combinations of indices and types.

Best,
Michael


(Shay Banon) #3

You should be able to search over multiple indices and multiple types.

On Fri, Dec 2, 2011 at 11:31 PM, michaelgeis michaelgeis11@gmail.comwrote:

I guess I found my answer. Here is the link in case someone else
stumbles on this:
http://www.elasticsearch.org/guide/reference/api/search/indices-types.html

It suggests one may query multiple types OR multiple indices OR all
indices (for given type or even all types)
-- but not arbitrary combinations of indices and types.

Best,
Michael


(system) #4