Performance - Routing vs separate index


(Arxisos) #1

Hi,

it would be nice to know if there is any performance difference if using a
separate index instead of a simple routing mechanism.
I've got following situation: Two different document types, but same
mapping definition.

So I'm curios which option fits the best for my needs:

  • Separate index for each document type
  • Same index, but different index types (with same mappings)
  • Same Index and same index type, but routing (?routing={DocumentType})

Is there any difference in performance or are there any other advantages or
disadvantages? What would you recommend?

Thanks!


(Arxisos) #2

I most note that the document types will mostly be searched separately.
That's the reason why I'm asking.


(Shay Banon) #3

It does not sounds like option 3 (routing) would be the correct one, since
it will force all the documents of a specific type to be in the same shard.

When they exist in the same index, then a query executes against all the
content and filtered (but highly cached) based on the type. If its in a
separate index, then there is no need to filter. So, different indices will
be faster.

On Wed, Dec 7, 2011 at 2:48 PM, Arxisos arxisos@googlemail.com wrote:

I most note that the document types will mostly be searched separately.
That's the reason why I'm asking.


(system) #4