简体   繁体   English

具有多租户的Couchbase Elastic Search插件

[英]Couchbase Elastic Search plugin with multi-tenancy

This is more of a design question while integrating couchbase with elastic search plugin. 这是在将沙发床与弹性搜索插件集成时更多的设计问题。 I have used couchbase with multitenancy in our previous product and we followed the the very first suggestion we found on couchbase blog here Single Couchbase Bucket for All Tenants . 我在先前的产品中使用过具有多租户功能的沙发床,并且我们遵循了在沙发床博客上找到的第一个建议,这里适用于所有租户的单沙发床

Now we are researching on exploiting elastic search features on couchbase data using the couchbase elastic search plugin. 现在,我们正在研究使用沙发床弹性搜索插件对沙发床数据进行弹性搜索的功能。 Going through the couchbase elastic search plugin documentation (installing and setup) I realized that you will be able to map only one couchbase bucket to one elasticsearch index . 仔细阅读了沙发床弹性搜索插件文档(安装和设置),我意识到您将只能将一个couchbase bucket映射到一个couchbase bucket elasticsearch index That documentation can be found here Elasticsearch plugin configuration and here Connecting to Cluster . 该文档可在此处Elasticsearch插件配置和此处连接到群集中找到 Now in that case, just as couchbase bucket, all the documents (regardless of the tenant) will reside in the same index. 现在,在这种情况下,就像“沙发床”存储桶一样,所有文档(无论租户如何)都将驻留在同一索引中。

Now here's my question. 现在这是我的问题。 Regardless of how the documents are stored in couchbase, I would like elasticsearch to index to be per tenant. 不管文档如何存储在沙发上,我都希望Elasticsearch为每个租户建立索引。 I am still quite new to playing around with the integration between these 2 systems but I am assuming that having separate search index per tenant (and each tenant/index having many different types of it's own) can most definitely 1) increase search performance per tenant 2) the performance of a particular search query on a specific tenant that might have minimal sets of data will not be impacted by having huge sets of data for some other tenant on the same index (although not plausible, assuming that the data sets between tenants differ by a factor of 50x) 我对这两个系统之间的集成还很陌生,但我假设每个租户拥有单独的搜索索引(每个租户/索引拥有多种不同类型的索引)绝对可以1)提高每个租户的搜索性能2)在特定租户上可能具有最少数据集的特定搜索查询的性能将不会因在同一索引上具有其他租户的海量数据集而受到影响(尽管不合理,假设租户之间的数据集相差50倍)

What I am wondering is, are my concerns valid. 我想知道的是,我的担忧是否有效。 Will performance on search queries be impacted by having all the tenants indexed together? 将所有租户索引在一起会不会影响搜索查询的性能? And if so, anyone has any solutions on how can achieve this using couchbase elastic search plugin ? 如果是这样,任何人都对如何使用沙发床弹性搜索插件实现此目标有任何解决方案?

All help and thoughts appreciated ! 所有的帮助和想法表示赞赏!

There's no simple way to separate the data that comes from a single Couchbase bucket to different ElasticSearch indexes when using the plugin. 使用插件时,没有简单的方法将单个Couchbase存储桶中的数据分离到不同的ElasticSearch索引。 What you CAN do is give the different tentants different types in ElasticSearch, while still keeping them in the same index. 您可以做的是在ElasticSearch中为不同的租户赋予不同的类型,同时仍将它们保留在相同的索引中。 This will both improve the search performance, and make the tentant management consistent between CB and ES. 这样既可以提高搜索性能,又可以使CB和ES之间的租户管理保持一致。

To map different documents from CB to different ES types, use the type selector feature of the transport plugin, as described here: http://docs.couchbase.com/admin/elastic/adv-usage.html (Scroll down to the section named "Setting document type") 要将不同的文档从CB映射到不同的ES类型,请使用传输插件的类型选择器功能,如下所述: http : //docs.couchbase.com/admin/elastic/adv-usage.html (向下滚动到该部分名为“设置文档类型”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM