Use filter or separate into 2 indices?


(Wing) #1

Here is a brief description of my index:

doc size: 6100000
number_of_shards: 10,
number_of_replicas: 1

among the docs, i have 2 disjoint sub-types with the following distribution:

type 1: 6000000
type 2: 100000

For the usage, we must query "type 1" and "type 2" separately, i.e.
each search result must be either type 1 or type 2.

So we filter on "type" every time we query/search, and it works ok.

But with the above data distribution, I expect most of shards will
just contain all docs of type 1 and does that mean, on those "type 1
only" shards, the use of "filter" is wasteful? Will it be better to
separate into 2 distinct indices so that to avoid the use of "type"
filter?

Wing


(system) #2