查询返回 [parsing_exception] [size] 查询格式错误,查询名称后没有 start_object,带有 { line=1 &列 = 264 } [英] query return [parsing_exception] [size] query malformed, no start_object after query name, with { line=1 & col=264 }

查看:60
本文介绍了查询返回 [parsing_exception] [size] 查询格式错误,查询名称后没有 start_object,带有 { line=1 &列 = 264 }的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 elasticsearch 的新手,我尝试使用开发工具来创建过滤器.这是什么工作,我想使用

I'm new in elasticsearch, and i try to use dev tools to create filters. here is what work and I want to use

POST /transform_alldomain/_search
{
  "size":0,
    "aggs": {
        "group": {
            "terms": {
                "field": "Email.keyword"
            },
            "aggs": {
        "group": {
            "terms": {
                "field": "bln.keyword"
            },
            "aggs": {
                "group_docs": {
                    "top_hits": {
                        "size": 1,
                        "sort": [
                            {
                                "extract_date.max": {
                                    "order": "desc"
                                }
                            }
                        ]
                    }
                }
            }
        }
    }
}
}}

现在我想用这个类似的东西来过滤,把它输入过滤器,编辑为查询 dsl

now i want to use this similiar stuff to filter as type this into filter, edit as query dsl

{
  "size":0,
    "aggs": {
        "group": {
            "terms": {
                "field": "Email.keyword"
            },
            "aggs": {
        "group": {
            "terms": {
                "field": "bln.keyword"
            },
            "aggs": {
                "group_docs": {
                    "top_hits": {
                        "size": 1,
                        "sort": [
                            {
                                "extract_date.max": {
                                    "order": "desc"
                                }
                            }
                        ]
                    }
                }
            }
        }
    }
}
}}

它回来了

[parsing_exception] [size] query malformed, no start_object after query name, with { line=1 & col=324 }

我不知道有什么区别以及如何使它工作

I don't know what is the difference and how to make it work

我需要从这个创建搜索对象

I need to create searched object from this

我如何执行过滤器:

它回来了

推荐答案

Discover 应用不是用于进行聚合的正确工具,Discover 应用仅适用于查询和过滤器.

The Discover app is not the right tool to use to make aggregations, the Discover app is only useful for queries and filters.

您想要实现的目标可以通过数据表可视化来完成.因此,不是发现,而是转到可视化,然后选择创建可视化"

What you want to achieve can be done with a Data table visualization. So instead of Discover, go to Visualize, then pick "Create Visualization"

然后选择数据表"可视化

Then pick the "Data Table" Visualization

然后选择你的索引模式

最后你可以像这样定义你的两个 terms 聚合:

And finally you can define your two terms aggregations like this:

这篇关于查询返回 [parsing_exception] [size] 查询格式错误,查询名称后没有 start_object,带有 { line=1 &列 = 264 }的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆