1
組我有一個Solr的文檔結構Solr的:通過多值字段
[
{
category:{mobiles},
name: iphone,
store: chroma,
discount: 10%
},
{
category:{mobiles,laptops},
name: Apple,
store: Reliance Digitals,
discount: 12%
},{
category:{electornics},
name: Boss,
store: chroma,
discount: 5%
},{
category:{headphones,mobiles},
name: Samsung,
store: Universal,
discount: 8%
},{
category:{headphones},
name: HTC,
store: Chroma,
discount: 50%
},
]
我需要一個Solr的查詢與響應
{
headphones: 2
mobiles: 3
laptops: 1
electornics: 1
}
簡單地說,我需要在一個多值字段中的組數。
請幫我這個。
謝謝。