Skip to content

parsing_exception #13

@bapzangbo

Description

@bapzangbo

hihi @dncrews i have use your example to build query like that

{
    "size": 10,
    "filter": {
        "and": [
            {
                "term": {
                    "appkey": "710659"
                }
            }
        ]
    }
}

and i receive error when using https://github.com/elastic/elasticsearch-js
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "Unknown key for a START_OBJECT in [filter].",
"line": 1,
"col": 21
}
],
"type": "parsing_exception",
"reason": "Unknown key for a START_OBJECT in [filter].",
"line": 1,
"col": 21
},
"status": 400
}

But when im modify the query like that, im fine

{
  "query": {
    "bool": {
      "filter": [
        {
          "term": {
            "appkey": "710569"
          }
        }
      ]
    }
  },
  "size": 10
}

so you can suggest me how can fix that when using your project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions