我有一个包含以下文件的索引:
[
{
"field1": "foo",
"field2": "bar"
},
...
]
Run Code Online (Sandbox Code Playgroud)
基本上,我需要的是一个字段添加field3到每个文档与field1和field2连接起来并用分号隔开,像这样:
[
{
"field1": "foo",
"field2": "bar",
"field3": "foo;bar"
},
...
]
Run Code Online (Sandbox Code Playgroud)
有什么方法可以将新列添加到我的所有文档中,从而自动复制其他字段中的值?
not analyzed我的索引上有一个字段:
"city": { "type": "string", "index": "not_analyzed" }
Run Code Online (Sandbox Code Playgroud)
我有一个如下聚合:
"aggs": {
"city": {
"terms": {
"field": "city"
}
}
}
Run Code Online (Sandbox Code Playgroud)
这给了我这样的输出:
"aggregations": {
"city": {
"doc_count_error_upper_bound": 51,
"sum_other_doc_count": 12478,
"buckets": [
{
"key": "New York",
"doc_count": 28420
},
{
"key": "London",
"doc_count": 23456
},
{
"key": "São Paulo",
"doc_count": 12727
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
我需要match_phrase_prefix在处理聚合之前添加一个查询,以根据用户文本过滤我的结果,如下所示:
{
"size": 0,
"query": {
"match_phrase_prefix": {
"city": "sao"
}
},
"aggs": {
"city": {
"terms": {
"field": "city"
}
} …Run Code Online (Sandbox Code Playgroud) 尝试放入数据时出现以下错误:
抱歉,意外错误:API调用datastore_v3.Put()需要的配额多于可用配额
问题是我没有超额配额,并启用了结算和Google Cloud Datastore API.我究竟做错了什么?