错误:
Fielddata is disabled on text fields by default. Set fielddata=true on [goodsId] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.]; nested: IllegalArgumentException[Fielddata is disabled on text fields by default. Set fielddata=true on [goodsId] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.];
方法:
在kibana中:
PUT /rewardsbay/_mapping/goods
{
"properties":{
"goodsId":{
"type":"text",
"fielddata":true
}
}
}
其中:
- rewardsbay:indexName
- goods:type
- goodsId:字段名