[英]ElasticSearch multiple types with same mapping in single index
I am designing an e-Commerce site with multiple warehouse. 我正在设计一个具有多个仓库的电子商务站点。 All the warehouses have same set of products.
所有仓库都有相同的产品集。 I am using ElasticSearch for my search engine.
我在为搜索引擎使用ElasticSearch。 There are 40 fields each ES document.
每个ES文档有40个字段。 20 out of them will differ in value per warehouse, rest 20 fields will contain same values for all warehouses.
每个仓库的价值中有20个会有所不同,其余20个字段将对所有仓库包含相同的价值。
I want to use multiple types (1 type for each warehouse) in 1 index. 我想在1个索引中使用多种类型(每个仓库1种类型)。 All of the types will have same mappings .
所有类型都将具有相同的映射 。 Please advise if my approach is correct for such scenario.
请告知我的方法在这种情况下是否正确。
Few things not clear to me, 很少有我不清楚的事情,
In my previous project, I experienced the same setting implementing a search engine with Elasticsearch on a multishop-platform. 在我之前的项目中,我经历了与在multishop平台上使用Elasticsearch实施搜索引擎相同的设置。 In that case we had all shops in one type and when searching per shop relevant filters were applied.
在这种情况下,我们所有商店都是一种类型,并且在按商店搜索时会应用相关过滤器。 Though, the approach to separate shop-data by "_type" seems pretty clean to me.
虽然,用“ _type”分隔车间数据的方法对我来说似乎很干净。 We applied it the other way, since my implementation was already able to cover it by filters at the moment of the feature request.
我们以另一种方式应用了它,因为我的实现已经能够在功能请求时通过过滤器将其覆盖。
Cheers, Dominik 干杯,多米尼克
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.