1
私を助けてくれますか?私は1000以上の商品を持つeコマースウェブサイトを持っています。各製品には、「カラー」、「サイズ」、その他の仕様のようなオプションがありますが、すべての属性がわかりません。私はこのマッピングと文書定義:エコノミクスショップ/ Neast属性の弾性検索バケットリスト
"mappings" : {
"article" : {
"properties": {
"options": {
"type": "nested",
"include_in_parent":"true",
"properties": {
"id": {"type": "string"},
"name": {"type": "string"},
"values": {"type": "string"}
}
}
}
}
をそして、これはバケットリストを取得するには、私のクエリです:
{
"query": {
"bool": {
"must": [
{
"term": {
"categorie_id": "f52330ce2669dfab884c2d60468b8466"
}
}
],
"must_not": [],
"should": []
}
},
"from": 0,
"size": 1,
"sort": [
{
"sorttype": {
"order": "desc"
}
},
"_score"
],
"aggs": {
"baked_goods": {
"nested": {
"path": "options"
},
"aggs": {
"name": {
"terms": {
"field": "id"
},
"aggs": {
"name": {
"terms": {
"field": "values"
}
}
}
}
}
}
}
}
私はドキュメントを得るが、バケットの結果は空です...
"color" => "red" (4)
"color" => "blue" (2)
"size" => "X" (11)
:
"aggregations": {
"baked_goods": {
"doc_count": 3331,
"name": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [ ]
}
}
}
は、私のような何かをしたいです
..
私を助けてもらえますか?