你可以的,加油

使用别名查询多个索引的效率?

Elasticsearch | 作者 EmilKwan | 发布于2016年06月03日 | 阅读数:9487

请问一下各位:相同的数据量,相同结构但不同项目,使用同一个索引合适还是使用建立多个索引,然后使用别名查询合适?


《Elasticsearch Server》
When working with multiple indices in Elasticsearch, you can sometimes lose track of
them. Imagine a situation where you store logs in your indices. Usually, the amount of
log messages is quite large, and therefore, it is a good solution to have the data divided
somehow. A logical division of such data is obtained by creating a single index for
a single day of logs (if you are interested in an open source solution used to manage
logs, look at the Logstash at http://logstash.net). But after some time, if we keep
all the indices, we will start to have a problem in taking care of all that. An application
needs to take care of all the information, such as which index to send data to, which
to query, and so on. With the help of aliases, we can change this to work with a single
name just as we would use a single index, but we will work with multiple indices.


我担忧,若建立多个索引,导致分片数突增,影响查询效率。
已邀请:

flowaters

赞同来自:

索引过大的话,同样会影响查询效率的。

建议不同业务的数据,不会关联到一起的数据,放在不同的索引里。

同一个业务的数据,可以按照业务需求和数据规模,来分拆到多个子索引。
 

yiqi_learn - 90 IT

赞同来自:

我担忧,若建立多个索引,导致分片数突增,影响查询效率?
这个你可以设定分片数,并且合并段啊,

hufuman

赞同来自:

既然不同项目,最好分开,数据维护和逻辑清晰,题目里说到的问题,都有解决方案

要回复问题请先登录注册