Filtering based on data in multiple indexes


(Derry O' Sullivan) #1

Hi all,

I'm designing an elasticsearch index 'schema' (need to get out of this
database lingo!) where i need to expose searches based on relationships
among documents.

If i have a user (object1) who likes a collection (object2) of documents
(object3), is it better to have 1 index with 3 types for each object or 1
index to represent the 3 types?

I know that filtering allows you to do 'where' (SQL analogy) queries but
that seems to be on a single index - how do i make this kind of
relationship work among multiple object types (in 1 or multiple indexes).

Many thanks,

Derry

--


(Derry O' Sullivan) #2

Just to add to this, not all the fields will be query data - (we may store
some of the fields in a DB and use ES as a lookup). The point is that we
want to use ES to expose fields that are searchable.

If we can perform all the functionality within ES, it would be great but
understand that we may need client side combination logic or jumping out to
a (No)SQL type structure.

On Wednesday, 10 October 2012 14:32:52 UTC+1, Derry O' Sullivan wrote:

Hi all,

I'm designing an elasticsearch index 'schema' (need to get out of this
database lingo!) where i need to expose searches based on relationships
among documents.

If i have a user (object1) who likes a collection (object2) of documents
(object3), is it better to have 1 index with 3 types for each object or 1
index to represent the 3 types?

I know that filtering allows you to do 'where' (SQL analogy) queries but
that seems to be on a single index - how do i make this kind of
relationship work among multiple object types (in 1 or multiple indexes).

Many thanks,

Derry

--


(system) #3