【发布时间】:2018-03-11 08:55:58
【问题描述】:
我对购买的服装使用以下功能分数:
{
"query": {
"function_score": {
"field_value_factor": {
"field": "purchased",
"factor": 1.2,
"modifier": "sqrt",
"missing": 1
}
}
}
}
但是,当我创建搜索时 - 我收到以下错误:
"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [purchased] 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."
搜索的语法是正确的,因为我在本地运行它并且它运行良好。我现在在我的服务器上运行它,但它不起作用。我需要在某处将购买定义为整数还是由于其他原因?
【问题讨论】:
标签: ruby-on-rails ruby elasticsearch search filter