我有
产品
index和I具有以下属性:
public class ProductType
{
public Guid Id { get; set; }
public string Title { get; set; }
public string Description{ get; set; }
public IList<string> ProductAttributes { get; set; }
public CompletionField Suggest { get; set; }
}
productType.Suggest= new CompletionField
{
Input =product.ProductAttributes.Select(x => x).ToList(),
Weight = 10
};
附言:
以下是我用于自动完成的查询:
GET product/producttype/_search
{
"suggest": {
"attribute-suggestions": {
"prefix": "c",
"completion": {
"field": "suggest"
}
}
},
"_source": {
"includes": [
"id",
"title",
"productAttributes"
]
}
}
编辑:
中央处理器
照相机
在5个产品中,我希望上面的查询能够提高摄像头的Cpu性能。