【发布时间】:2015-12-29 19:10:06
【问题描述】:
我的问题是,是否有办法在 numeric field 上的 terms include 上使用 elasticsearch aggregation。
我在弹性搜索中对多个字段使用通用查询,这很好,因为我的大多数字段都是string values,我可以使用include 指定唯一字段。然而,我的一个字段是 numeric value 并抛出此错误:
"cannot support regular expression style include/exclude settings as
they can only be applied to string fields"
所以我的问题是,对于数值是否有一个相当于字符串匹配包含?我尝试使用从 9 到 9 的 range set 进行匹配,但它没有返回任何内容,不幸的是,它是由指定的范围而不是我想要的 specified field 的值键入的。任何意见将不胜感激!
谢谢!
【问题讨论】:
标签: elasticsearch