// Reduced irrelevant attributes
{
"code": "product code",
"saleIncludeCustomers": [ // Object
{
"code": "Customer code",
"launchId": "launchId"
}
],
"saleByLaunchRule": [ // nested
{
"center": "center",
"channel": "channel",
"subChannel": "subChannel",
"launchId": "launchId",
"endDate": 1777478400000
}
],
"saleExcludeCustomers": [ // Blacklist
"Customer code"
],
"centerIncludeCustomers": {
"center1": [
{
"code": "Customer code",
"launchId": "launchId"
}
],
"center2": [
{
"code": "Customer code",
"launchId": "launchId"
}
]
}
}
In my scenario, there may be a lot of data for salesInclusieCustomers, centerInclusieCustomers, and salesByLaunchRule, such as thousands。
The fields salesInclusieCustomers, centerInclusieCustomers, and salesByLaunchRule are mainly used to filter data and do not need to be returned during queries
I will generate test data according to the following
- SaleIncludeCustomers Fill 200
- Fill 1000 salesExcludeCustomers
- CenterInclusieCustomers fill 42 centers, with 620 customer objects filled in each center
- Each customer object has two attributes, one is the customer ID and the other is the advertising rule ID
- 620 * 42=26000, which meets the total number of customers
- SaleByLaunchRule Fill 500
At this point, the document size is about 530kb, but I have verified the query and it is still very fast. I would like to ask what is the appropriate document size in ES?
Note: This index is the product index, so according to the product dimension, the number of documents will not be very large, currently around 30000
Index Details
GET /_cat/indices/jiankunking_product_test_v2?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open jiankunking_product_test_v2 8HzUbdbHTdiyOJ3Ym8OnaA 12 1 15134264 0 30.5gb 15.2gb
GET /jiankunking_product_test_v2/_search?track_total_hits=true
{
"size": 0
}
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 12,
"successful" : 12,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 30088,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
}
}