Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trends panel does not take filters into account when calculating 'old' stats #1311

Closed
jpastuszek opened this issue Jun 17, 2014 · 3 comments · Fixed by #204528
Closed

Trends panel does not take filters into account when calculating 'old' stats #1311

jpastuszek opened this issue Jun 17, 2014 · 3 comments · Fixed by #204528
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@jpastuszek
Copy link

Hi,

Trends panel does not take filters into account when calculating 'old' stats.
Not sure if this is by design... if it is please make a note for it since I am getting unexpected results; also in this case it would be nice if there was a tick box that would make it to include the filters for old match as well so I can compare apples with apples.

  "facets": {
    "0": {
      "query": {
        "filtered": {
          "query": {
            "query_string": {
              "query": "dataSource:\"Backend\""
            }
          },
          "filter": {
            "bool": {
              "must": [
                {
                  "range": {
                    "@timestamp": {
                      "from": 1402905600000,
                      "to": 1402992000000
                    }
                  }
                },
                {
                  "fquery": {
                    "query": {
                      "query_string": {
                        "query": "appSource:\"dub_en_prod\" OR appSource:dublin"
                      }
                    },
                    "_cache": true
                  }
                }
              ]
            }
          }
        }
      }
    },
...
    "old_0": {
      "query": {
        "filtered": {
          "query": {
            "query_string": {
              "query": "dataSource:\"Backend\""
            }
          },
          "filter": {
            "bool": {
              "must": [
                {
                  "match_all": {}
                },
                {
                  "range": {
                    "@timestamp": {
                      "from": 1402819200000,
                      "to": 1402905600000
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },

I am using Kibana 3.1.0.

@rashidkpc rashidkpc added the bug label Jun 17, 2014
@nikolaialex
Copy link

I have the same problems. My pull request #1329 will fix it.

@loren
Copy link
Contributor

loren commented Sep 29, 2014

Nice catch @nikolaialex ! I have the same problem and your open-close paren solution fixed it.

@rashidkpc
Copy link
Contributor

We've removed the trend panel for the time being. We'd like to bring back similar functionality with the support of the elasticsearch server todo the computation across the buckets.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 17, 2024
stephmilovic pushed a commit that referenced this issue Dec 17, 2024
…encoding (#204528) (#204616)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Fix code scanning alert no. 494: Incomplete string escaping or
encoding (#204528)](#204528)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Faisal
Kanout","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-17T16:45:16Z","message":"Fix
code scanning alert no. 494: Incomplete string escaping or encoding
(#204528)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/494](https://github.com/elastic/kibana/security/code-scanning/494)\r\nFixes
#1311\r\n\r\nEscape first backslash occurrences and all single quotes in
the
`filter`\r\nstring.","sha":"cc34e97de4d2d8a5509eec5e4f9ffcb7338ed54a","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-management"],"title":"Fix
code scanning alert no. 494: Incomplete string escaping or
encoding","number":204528,"url":"https://github.com/elastic/kibana/pull/204528","mergeCommit":{"message":"Fix
code scanning alert no. 494: Incomplete string escaping or encoding
(#204528)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/494](https://github.com/elastic/kibana/security/code-scanning/494)\r\nFixes
#1311\r\n\r\nEscape first backslash occurrences and all single quotes in
the
`filter`\r\nstring.","sha":"cc34e97de4d2d8a5509eec5e4f9ffcb7338ed54a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204528","number":204528,"mergeCommit":{"message":"Fix
code scanning alert no. 494: Incomplete string escaping or encoding
(#204528)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/494](https://github.com/elastic/kibana/security/code-scanning/494)\r\nFixes
#1311\r\n\r\nEscape first backslash occurrences and all single quotes in
the
`filter`\r\nstring.","sha":"cc34e97de4d2d8a5509eec5e4f9ffcb7338ed54a"}}]}]
BACKPORT-->

Co-authored-by: Faisal Kanout <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants