Elasticsearch query shows more count than it has

In one of my field I have "xr" data and "xra","xrb","xrc" separetely. When I make query of the count of "xr" it says I have 4 data. But I expect from elasticsearch to say 1. What do I need to change?

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

This is my query:

"aggs": {
                "Group1": {
                    "terms": {
                        "field": "method.keyword",
                        "include": ".*POST.*",
                    },
                    "aggs": {
                        "Group3": {
                            "terms": {
                                "field": "contains.keyword",
                                "size": 11593,

                            }
                        }

                    },

                        }

This is my mapping : https://paste.ubuntu.com/p/v5KjB8NqHf/

Did you read About the Elasticsearch category?

I can't reproduce anything here.

I read sir but I use this query on python-elasticsearch library. Do you know how can I provide that information. I have no idea.

Do you know how can I provide that information?

Sure.

  • Start kibana.
  • Open the Dev Console.
  • Write a similar script as I shared which reproduces your problem.
  • Once you have reproduced the problem, share the script here. Then from this point we can surely help.

It gives "[10:22:14.309] [warning][task_manager] PollError [illegal_argument_exception] Malformed [mappings] section for type [dynamic], should include an inner object describing the mapping
" error. How can I solve it?

I don't know what you did. Can't help to fix.
At least share what you wrote.

I just downloaded the kibana and started it with "./bin/kibana". I also changed the elasticsearch.host in kibana.yml ( I gave the address that I have my index). This error showed up.

I'd say that you mixed version may be? But really unsure as I know very little about your setup.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.