1 |
2.50 ms |
Request:
{"index":"sw_product","search_type":"query_then_fetch","track_total_hits":true,"body":{"query":{"bool":{"filter":[{"bool":{"must":[{"bool":{"must":[{"nested":{"path":"visibilities","query":{"bool":{"must":[{"range":{"visibilities.visibility":{"gte":30}}},{"term":{"visibilities.salesChannelId":"250c23c94a704f8ba1b4819c38901688"}}]}}}},{"term":{"active":true}}]}},{"nested":{"path":"categoriesRo","query":{"term":{"categoriesRo.id":"306c88be73884343ab50185db6296490"}}}},{"bool":{"must_not":[{"bool":{"must_not":[{"exists":{"field":"displayGroup"}}]}}]}}]}}]}},"sort":[{"_script":{"type":"number","script":{"source":"def languages = params['languages'];\ndef suffix = params.containsKey('suffix') ? '.' + params['suffix'] : '';\n\nfor (int i = 0; i < languages.length; i++) {\n def field_name = params['field'] + '.' + languages[i] + suffix;\n\n if (doc[field_name].size() > 0 && doc[field_name].value != null && doc[field_name].value.toString().length() > 0) {\n def fieldValue = doc[field_name].value;\n\n return fieldValue;\n }\n}\n\nif (params['order'] == 'asc') {\n return Double.MAX_VALUE;\n}\n\nreturn Double.MIN_VALUE;\n","lang":"painless","params":{"field":"customFields","languages":["2fbb5fe2e29a4d70aa5854ce7ce3e20b"],"suffix":"custom_product_rosland_set_year","order":"desc"}},"order":"DESC"}},{"id":{"order":"ASC"}}],"aggregations":{"total-count":{"cardinality":{"field":"displayGroup"}}},"from":0,"size":36,"collapse":{"field":"displayGroup"},"timeout":"5s"}}
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 13,
"relation": "eq"
},
"max_score": null,
"hits": [
{
"_index": "sw_product_1717666750",
"_id": "019473f357ca71edbe91365214e96138",
"_score": null,
"_source": {
"id": "019473f357ca71edbe91365214e96138",
"autoIncrement": 4961.0
},
"fields": {
"displayGroup": [
"50e5905fb78197eb9e7f5dfb65ec7188"
]
},
"sort": [
2025.0,
"019473f357ca71edbe91365214e96138"
]
},
{
"_index": "sw_product_1717666750",
"_id": "0192d26cde067279820bba8c4b4e9dce",
"_score": null,
"_source": {
"id": "0192d26cde067279820bba8c4b4e9dce",
"autoIncrement": 4914.0
},
"fields": {
"displayGroup": [
"9cd9bebcecf8188dcd5bdca91d3cfda2"
]
},
"sort": [
2024.0,
"0192d26cde067279820bba8c4b4e9dce"
]
},
{
"_index": "sw_product_1717666750",
"_id": "01931b0f015e726c8d751de963cc9b2f",
"_score": null,
"_source": {
"id": "01931b0f015e726c8d751de963cc9b2f",
"autoIncrement": 4924.0
},
"fields": {
"displayGroup": [
"38adfeb6dfbf60769a916e65db20ffdc"
]
},
"sort": [
2024.0,
"01931b0f015e726c8d751de963cc9b2f"
]
},
{
"_index": "sw_product_1717666750",
"_id": "192f7ecd16ee447988392ed861dfb8b1",
"_score": null,
"_source": {
"id": "192f7ecd16ee447988392ed861dfb8b1",
"autoIncrement": 4201.0
},
"fields": {
"displayGroup": [
"52094b7f322ab1bf81d233a5b27fd9b8"
]
},
"sort": [
2021.0,
"192f7ecd16ee447988392ed861dfb8b1"
]
},
{
"_index": "sw_product_1717666750",
"_id": "a9c296e7788c42fe826d3ac3954479f1",
"_score": null,
"_source": {
"id": "a9c296e7788c42fe826d3ac3954479f1",
"autoIncrement": 4217.0
},
"fields": {
"displayGroup": [
"b4a4be901f8625924a3846132eb4a081"
]
},
"sort": [
2021.0,
"a9c296e7788c42fe826d3ac3954479f1"
]
},
{
"_index": "sw_product_1717666750",
"_id": "bbb620d15aee4ebd85a4720078441b74",
"_score": null,
"_source": {
"id": "bbb620d15aee4ebd85a4720078441b74",
"autoIncrement": 4154.0
},
"fields": {
"displayGroup": [
"529b213c79d5016442c8a5dd8bc42bca"
]
},
"sort": [
2021.0,
"bbb620d15aee4ebd85a4720078441b74"
]
},
{
"_index": "sw_product_1717666750",
"_id": "c11b75a537894c9cb3924473241ed450",
"_score": null,
"_source": {
"id": "c11b75a537894c9cb3924473241ed450",
"autoIncrement": 4209.0
},
"fields": {
"displayGroup": [
"0981c8aa422e933abe9271e3b2ec6786"
]
},
"sort": [
2021.0,
"c11b75a537894c9cb3924473241ed450"
]
},
{
"_index": "sw_product_1717666750",
"_id": "ec7a435c8176464289edaae82d9bed6f",
"_score": null,
"_source": {
"id": "ec7a435c8176464289edaae82d9bed6f",
"autoIncrement": 3789.0
},
"fields": {
"displayGroup": [
"b620197cc5952d5607f6c1262440c726"
]
},
"sort": [
2020.0,
"ec7a435c8176464289edaae82d9bed6f"
]
},
{
"_index": "sw_product_1717666750",
"_id": "61cbc672eb744711b61b578a30819bc0",
"_score": null,
"_source": {
"id": "61cbc672eb744711b61b578a30819bc0",
"autoIncrement": 2251.0
},
"fields": {
"displayGroup": [
"e591c4f4c3c44dcd2242f67d448f0e2f"
]
},
"sort": [
2019.0,
"61cbc672eb744711b61b578a30819bc0"
]
},
{
"_index": "sw_product_1717666750",
"_id": "6cbaba1cb5494fe4abc902682edfd175",
"_score": null,
"_source": {
"id": "6cbaba1cb5494fe4abc902682edfd175",
"autoIncrement": 2279.0
},
"fields": {
"displayGroup": [
"21ca6fa454727e6479e52b18bb899546"
]
},
"sort": [
2019.0,
"6cbaba1cb5494fe4abc902682edfd175"
]
},
{
"_index": "sw_product_1717666750",
"_id": "c65c7d0fafbb4ff5bcdf39044d0f9493",
"_score": null,
"_source": {
"id": "c65c7d0fafbb4ff5bcdf39044d0f9493",
"autoIncrement": 1218.0
},
"fields": {
"displayGroup": [
"1ba96761ed3de0f043731ea860094c0f"
]
},
"sort": [
2019.0,
"c65c7d0fafbb4ff5bcdf39044d0f9493"
]
},
{
"_index": "sw_product_1717666750",
"_id": "f0e58f8b5d134e9f92ba997d2ae1dbe9",
"_score": null,
"_source": {
"id": "f0e58f8b5d134e9f92ba997d2ae1dbe9",
"autoIncrement": 599.0
},
"fields": {
"displayGroup": [
"4c5e2bbb531fc5d84d9426abcc667465"
]
},
"sort": [
2019.0,
"f0e58f8b5d134e9f92ba997d2ae1dbe9"
]
},
{
"_index": "sw_product_1717666750",
"_id": "f69c5a3c3ed84c3eb48a83854c26b19d",
"_score": null,
"_source": {
"id": "f69c5a3c3ed84c3eb48a83854c26b19d",
"autoIncrement": 2324.0
},
"fields": {
"displayGroup": [
"fa06b5333ed59e322d7629866107fc6e"
]
},
"sort": [
2019.0,
"f69c5a3c3ed84c3eb48a83854c26b19d"
]
}
]
},
"aggregations": {
"total-count": {
"value": 13
}
}
}
Shopware\Elasticsearch\Framework\DataAbstractionLayer\ElasticsearchEntitySearcher:search
|
2 |
1.04 ms |
Request:
{"index":"sw_product","track_total_hits":false,"body":{"query":{"bool":{"filter":[{"bool":{"must":[{"bool":{"must":[{"nested":{"path":"visibilities","query":{"bool":{"must":[{"range":{"visibilities.visibility":{"gte":30}}},{"term":{"visibilities.salesChannelId":"250c23c94a704f8ba1b4819c38901688"}}]}}}},{"term":{"active":true}}]}},{"nested":{"path":"categoriesRo","query":{"term":{"categoriesRo.id":"306c88be73884343ab50185db6296490"}}}},{"bool":{"must_not":[{"bool":{"must_not":[{"exists":{"field":"displayGroup"}}]}}]}}]}}]}},"aggregations":{"manufacturer":{"terms":{"field":"manufacturerId","size":10000}},"price":{"stats":{"script":{"source":"double getPrice(def accessors, def doc, def decimals, def round, def multiplier) {\n for (accessor in accessors) {\n def key = accessor['key'];\n\n if (!doc.containsKey(key) || doc[key].empty) {\n continue;\n }\n\n def factor = accessor['factor'];\n def value = doc[key].value * factor;\n\n value = Math.round(value * decimals);\n value = (double) value \/ decimals;\n\n if (!round) {\n return (double) value;\n }\n\n value = Math.round(value * multiplier);\n\n value = (double) value \/ multiplier;\n\n return (double) value;\n }\n\n return 0;\n}\n\nreturn getPrice(params['accessors'], doc, params['decimals'], params['round'], params['multiplier']);\n","lang":"painless","params":{"accessors":[{"key":"cheapest_price_rule64bf19224e314563aba24460dda765f8_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule89d3fe06bd7c478194fe9179a9602df5_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_ruled980a6dfc7774cd192e0b1a183764274_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule01961afbc995737796b164a7b5355b5d_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule01961afbca2673cf9fb2d67da0cd8a62_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule0197e9e4d10e7293b705c1d0eee95b29_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule0197e9e4d446718a91aafc7b03ab341a_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rule6235b68395cd475f90278d41d7b1b36c_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_ruleac5af03b5965434681e7c4cb42720d2b_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_rulecc1de6f5416545d3a68a00f78e8f20f3_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1},{"key":"cheapest_price_ruledefault_currencyb7d2554b0ce847cd82f3ac9bd1c0dfca_gross","factor":1}],"decimals":100,"round":true,"multiplier":100.0}}}},"rating-exists":{"filter":{"range":{"ratingAverage":{"gte":0.0}}},"aggregations":{"rating":{"max":{"field":"ratingAverage"}}}},"shipping-free-filter":{"filter":{"term":{"shippingFree":true}},"aggregations":{"shipping-free":{"max":{"field":"shippingFree"}}}},"properties":{"nested":{"path":"properties"},"aggregations":{"properties":{"terms":{"field":"properties.id","size":10000}}}},"options":{"nested":{"path":"options"},"aggregations":{"options":{"terms":{"field":"options.id","size":10000}}}}},"size":0,"timeout":"5s"},"search_type":"query_then_fetch"}
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"skipped": 0,
"failed": 0
},
"hits": {
"max_score": null,
"hits": []
},
"aggregations": {
"shipping-free-filter": {
"doc_count": 0,
"shipping-free": {
"value": null
}
},
"rating-exists": {
"doc_count": 13,
"rating": {
"value": 0.0
}
},
"price": {
"count": 13,
"min": 8.33,
"max": 160.29,
"avg": 45.888461538461534,
"sum": 596.55
},
"options": {
"doc_count": 0,
"options": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
},
"properties": {
"doc_count": 197,
"properties": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "45018ee86cc84c47b8d18583215e11fb",
"doc_count": 13
},
{
"key": "de88ad12fea44d74b9c2a1f1edf7ecdf",
"doc_count": 13
},
{
"key": "bb2aca011dc44badab027fb55a1ec97b",
"doc_count": 11
},
{
"key": "d3cfb18b53ee4a4486a2f4d64f53934f",
"doc_count": 11
},
{
"key": "256aa072d598469cbe2a99d63859b36e",
"doc_count": 9
},
{
"key": "8cf95386ad3f4cbc911c3258b1a3fbde",
"doc_count": 9
},
{
"key": "c00d09ec51844aefa2781fcc00839644",
"doc_count": 9
},
{
"key": "f3addfa0aa8f492b93ef4d41f76ff1fd",
"doc_count": 9
},
{
"key": "b81318b1758e42bc8be1559a7f6df0bc",
"doc_count": 7
},
{
"key": "d7835742aa644750b59473d1d473ccf7",
"doc_count": 7
},
{
"key": "674eeda781014bc7b35fe9b6e2849616",
"doc_count": 5
},
{
"key": "adfd37fa8d88405d8be97bde6b963aef",
"doc_count": 5
},
{
"key": "50bede51bbaa4f4aba7003a45cf998b3",
"doc_count": 4
},
{
"key": "5ab38019ed7843e7b3b2218c5a19e933",
"doc_count": 4
},
{
"key": "a4803386d1764670babc5083c0f4c47f",
"doc_count": 4
},
{
"key": "63edad6641f44fbb9149528017bf8d0d",
"doc_count": 3
},
{
"key": "bcfd8dff179149088e720a4ff4527e56",
"doc_count": 3
},
{
"key": "c1d70719badf4382b9dabd1bb5a380bf",
"doc_count": 3
},
{
"key": "d4a351b83deb42719a00ef284e34b4ce",
"doc_count": 3
},
{
"key": "004c9f1122be4d3db1dadecc53a44cdf",
"doc_count": 2
},
{
"key": "018af03e1d7c7c8dabe65059358dbeba",
"doc_count": 2
},
{
"key": "019306d8651176b6ad2b86093ee45782",
"doc_count": 2
},
{
"key": "05562f74e05a4ac8b043a602c3d29b33",
"doc_count": 2
},
{
"key": "117fa6dc56524d5080b1ead868ce6e57",
"doc_count": 2
},
{
"key": "27bd6ae8d79647cfb9c36b8005f95e1e",
"doc_count": 2
},
{
"key": "39af2c06830c4a2c97f9d7228ef1f853",
"doc_count": 2
},
{
"key": "4d0caa14da8741f3b3809e6dbda669ab",
"doc_count": 2
},
{
"key": "533c18981dc3456b8d597efdf3ebe940",
"doc_count": 2
},
{
"key": "745d9946202e4310a3288c5a80070301",
"doc_count": 2
},
{
"key": "9f63f7a9675e490aa0c2ce7eb91381df",
"doc_count": 2
},
{
"key": "cce1e9f6f74d4013b63a51eac20d12dc",
"doc_count": 2
},
{
"key": "d0c07ddcae6a4425b96e363887660b9f",
"doc_count": 2
},
{
"key": "ddf74bb0583c4c78bac5bf9349dc5a03",
"doc_count": 2
},
{
"key": "01928a7829d67d639ecf3241a302231e",
"doc_count": 1
},
{
"key": "0aabada48aa64df995d6e54d86f3779b",
"doc_count": 1
},
{
"key": "0aea87c0c1d345489e55a6393f53aa46",
"doc_count": 1
},
{
"key": "0c189ea565ab4573a222115adc6b9258",
"doc_count": 1
},
{
"key": "0fa09c56e8f545a6aa7c982c17bdb58b",
"doc_count": 1
},
{
"key": "1af482d544b54aecac5af66a28566895",
"doc_count": 1
},
{
"key": "1af89084374c423fb6d1a5300204fa25",
"doc_count": 1
},
{
"key": "1c44c485b8c94aa1b9410be2267cba15",
"doc_count": 1
},
{
"key": "283841f65684409691814a47efb14105",
"doc_count": 1
},
{
"key": "2f71c6ffbd5a4138a05a054799dc6b4e",
"doc_count": 1
},
{
"key": "3ac3928274d749e5824c6cca5e381c94",
"doc_count": 1
},
{
"key": "3e0fa93c00b4431db477f409532e4d8b",
"doc_count": 1
},
{
"key": "3eda02a18e5f40ec810d1060ed36774c",
"doc_count": 1
},
{
"key": "4342114530494e96a35750f2c349fa1b",
"doc_count": 1
},
{
"key": "457816050d9e4b619e7fdddfbf31b579",
"doc_count": 1
},
{
"key": "4f23eed7960745ef9e496fe1cc6c40de",
"doc_count": 1
},
{
"key": "62d32f133e124b8eafc5afb8a3e41cd8",
"doc_count": 1
},
{
"key": "63003514bc4246e8a23e7606ca7f515d",
"doc_count": 1
},
{
"key": "69fe8056639d4444882ef24c2b912ba8",
"doc_count": 1
},
{
"key": "6f92af8d0f0a4ae99239c1bd9f68d3d3",
"doc_count": 1
},
{
"key": "7113f43a08a84f60a41b18974aa5e297",
"doc_count": 1
},
{
"key": "7b0b4005d21e44b096ed3d4b26b4f971",
"doc_count": 1
},
{
"key": "7d8ad8823f454b6985e477453c0e195b",
"doc_count": 1
},
{
"key": "950074db1e3749c6a39dbce3b25beda3",
"doc_count": 1
},
{
"key": "975484cdbc7c495e9a09a3f4f25f6847",
"doc_count": 1
},
{
"key": "a0ad0c7e2c5d41d0b574d2de76adc9ac",
"doc_count": 1
},
{
"key": "aca2278dd7cb406fb0d3b5407da74ad0",
"doc_count": 1
},
{
"key": "b57d1d0eb833459bbda07a3adca6714c",
"doc_count": 1
},
{
"key": "beb3700040e8485a9994e2820548b7e6",
"doc_count": 1
},
{
"key": "ca0798b913784ff9880ac954d5b61825",
"doc_count": 1
},
{
"key": "d3359e7ac09a42d3b7d5cf34c349a688",
"doc_count": 1
},
{
"key": "d4fcef3a106249e18ac748333b0082ef",
"doc_count": 1
},
{
"key": "e8a5fb189c7c4b8bab1617c8506ef2e3",
"doc_count": 1
},
{
"key": "eac8c8144d2e468883704735d116f85f",
"doc_count": 1
},
{
"key": "f7fcd5b43919408abc47ad22817057e8",
"doc_count": 1
},
{
"key": "fa4d302b3fd54418899166bcabe83011",
"doc_count": 1
},
{
"key": "ff2055aece7b405f9f3df57ef1afc000",
"doc_count": 1
}
]
}
},
"manufacturer": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "0c6346a583ce4d0c93a8911b89371b9a",
"doc_count": 13
}
]
}
}
}
Shopware\Elasticsearch\Framework\DataAbstractionLayer\ElasticsearchEntityAggregator:aggregate
|