【发布时间】:2014-02-06 23:21:24
【问题描述】:
我目前正在调查常用术语查询的使用,并且由于文档有点缺乏(要么就是我没有找到关于这些问题的任何文档),我不完全确定某些操作是否与 common 不兼容术语查询,或者我做错了。
我目前在 Ubuntu 12.04 64 位中使用 Elasticsearch 版本 0.90.5。
这是我观察到的:
查询类型 match 和 match_phrase 似乎与 high_freq_operator、low_freq_operator 和 minimum_should_match 选项的使用不兼容。 (例如
[match] query does not support [high_freq_operator]和类似的)and、or、and not(复合表达式)在其组成表达式指定使用常用术语时,似乎会产生损坏的底层表达式。 (例如
[_na] filter malformed, must start with start_object)span_term 查询似乎与常用术语查询不兼容。 (例如
[span_term] query does not support [common])
我的查询如下所示:
这个解析例如...
{ "query": {
"match_phrase": {
"subject": {
"common": {
"body": {
"cutoff_frequency": 0.001,
"query": "something not important"
}
}
}
}
}
}
这个解析失败,引用“[match] query does not support [high_freq_operator]”:
{"query": {
"match_phrase": {
"subject": {
"common": {
"body": {
"cutoff_frequency": 0.001,
"high_freq_operator": "or",
"query": "something not important"
}
}
}
}
}
}
这个解析失败,引用“filter malformed, must start with start_object”:
{
"filter": {
"or": [
{
"query": {
"match": {
"subject": {
"common": {
"body": {
"cutoff_frequency": 0.001,
"query": "PLEASE READ: something not important"
}
}
}
}
}
},
{
"query": {
"range": {
"date": {
"to": "2009-12-31T23:59:59Z"
}
}
}
}
]
}
}
【问题讨论】:
标签: elasticsearch