Giter Site home page Giter Site logo

Comments (3)

jammann avatar jammann commented on August 22, 2024 3

Also from me: thanks for the excellent work! This bug here (which I think is a dupe of #4) disturbs me. I think I found the reason. It's happening (for me) always when I have both QUERY and FILTER restrictions - which is almost always the case

Panels work because there the QUERY parts from Kibana is applied with a SHOULD in the ES query, while the FILTER parts are applied as filtered aggregations to the aggs themselves

In the table however the part from Kibana FILTER and QUERY are applied within one big bool filter. And per the documentation https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html a SHOULD term in such a combination is only used for scoring, but not really for filtering

I will try to come up with a pull request

from kibana3.

mikapp avatar mikapp commented on August 22, 2024

Here are JSONs from inspect field for table panel in both original Kibana 3 and this fork so it might help to see why it behaves differently:

Original Kibana with ES 1.7

"query": {
    "filtered": {
      "query": {
        "bool": {
          "should": [
            {
              "query_string": {
                "query": "*"
              }
            }
          ]
        }
      },
      "filter": {
        "bool": {
          "must": [
            {
              "range": {
                "@timestamp": {
                  "from": 1509732179320,
                  "to": 1509735779320
                }
              }
            }
          ]
        }
      }
    }
  },
  

Custom Kibana3 with ES 5.6

"query": {
    "bool": {
      "filter": [
        {
          "range": {
            "@timestamp": {
              "from": 1509715711095,
              "to": 1509737311095
            }
          }
        },
        {
          "range": {
            "@timestamp": {
              "from": 1509720759162,
              "to": 1509721934842
            }
          }
        }
      ],
      "should": [
        {
          "query_string": {
            "query": "*"
          }
        }
      ]
    }
  },

from kibana3.

mikapp avatar mikapp commented on August 22, 2024

@jammann I forked your branch with fixes and it works fine for me. Table now only shows data from query as expected. Thanks for addressing it!

from kibana3.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.