
它与“ a”,“ b”,“
c”一起使用,因为
the_field默认情况下将其作为字符串而不是整数存储在Elasticsearch中。您可以通过以下方式检查映射来验证:
$ curl -XGET 'http://localhost:9200/idx/type/_mapping'
以下应设置适当的字段类型:
$ curl -XPUT 'http://localhost:9200/idx/type/_mapping' -d ' { "type" : { "properties" : { "the_field" : {"type" : "integer" } } } }更新映射,重新索引您的数据,看看是否可行。如果需要,请参阅PUT Mapping
API以获得其他指导。