Specific Indexes and Routing and Aliases and more using query DSL

  1. I have 10 indexes in total and I want to search only in 4 indexes.Is it
    possible to search in specific indexes using query DSL?
  2. What is the order followed when multiple indexes are queried?
  3. Can we use index awareness attribute while querying?
  4. Is it possible to query each index with the same routing value? Is it
    possible to specify routing using query DSL?
  5. What is the limit for the number of aliases allowed in a cluster? Is it
    possible to specify alias using query DSL?
  6. Is it possible to specify a range of documents for 'ids' DSL query? This
    will be help me point to the right documents inside a shard.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

1). You can specify indices which indices to query via the url or via the
indices query (
Elasticsearch Platform — Find real-time answers at scale | Elastic)
2) What order do you refer to?
3) Yes, this can be done via the indices query mentioned in point 1.
4) The routing value specified via the url is used in all indices you're
querying.
5) There is no ES limit, you can store many aliases in the cluster. You can
use aliases in the query dsl.
6) There is an ids query:
Elasticsearch Platform — Find real-time answers at scale | Elastic

On 7 September 2013 19:31, bin bibin.abraham.dev@gmail.com wrote:

  1. I have 10 indexes in total and I want to search only in 4 indexes.Is it
    possible to search in specific indexes using query DSL?
  2. What is the order followed when multiple indexes are queried?
  3. Can we use index awareness attribute while querying?
  4. Is it possible to query each index with the same routing value? Is it
    possible to specify routing using query DSL?
  5. What is the limit for the number of aliases allowed in a cluster? Is it
    possible to specify alias using query DSL?
  6. Is it possible to specify a range of documents for 'ids' DSL query?
    This will be help me point to the right documents inside a shard.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

  1. Order - say i give http://localhost:9200/index1,index2,index3?.....
    Will it first execute the query in index1 and then index2 and then index3?

No, it executes in parallel on all shards that belong to index1, 2, and 3.
What is the reason behind this question?

In my case, multiple apps might be using same cluster. So is the following
design correct:

Cluster Level Awareness - Handling Master Slave. Thus, clearly separating
it.

ES doesn't have a notion of master slave cluster awareness. There are
primary and replica shards for read / write operations and there is an
elected master that handles cluster wide administration.

Index Level Awareness - Handling multiple apps as each entity will be a
separate index rather than each app as an index. This will help in
allocating proper primary shards for each index and scaling according to it.

Each application having its own index will allow you to tune the settings
for each application need, this is valid design option.

Routing - Handling organisation for apps

And routing can help you to keep data with a specific property within a
shard, this allows you to keep search requests limited to only a few shards
instead to all shards that belong to an index. Routing by organisation
seems like a good property to use (assuming that it more or less partitions
the data into even shards)

If 'ids' range is supported, I can add each organisation as an alias with
the ids filter and a routing value

On the id field no numeric range is supported, since it is a string, if you
want to query documents based on a numeric range you are free to add an
additional number based field which you can use to execute a range filter
or query.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.