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

[TSVB] Search by Rollup index not working #56147

Closed
alexwizp opened this issue Jan 28, 2020 · 4 comments
Closed

[TSVB] Search by Rollup index not working #56147

alexwizp opened this issue Jan 28, 2020 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) regression Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@alexwizp
Copy link
Contributor

Kibana version:
v7.5?, v.7.6, master

Describe the bug:
Search by Rollup index not working from TSVB visualization

Steps to reproduce:

  1. Install kibana_sample_data_ecommerce sample data;
  2. Create a new Rollup Job by kibana_sample_data_ecommerce index. I created the index using the following configuration:
{
  "config": {
    "id": "rollup_kibana_sample_data_ecommerce",
    "index_pattern": "kibana_sample_data_ecommerce",
    "rollup_index": "rollup_kibana_sample_data_ecommerce",
    "cron": "0 * * * * ?",
    "groups": {
      "date_histogram": {
        "calendar_interval": "1m",
        "field": "order_date",
        "delay": "1m",
        "time_zone": "UTC"
      },
      "histogram": {
        "interval": 5,
        "fields": [
          "day_of_week_i",
          "products.price",
          "total_quantity"
        ]
      },
      "terms": {
        "fields": [
          "currency",
          "customer_phone",
          "day_of_week",
          "day_of_week_i",
          "email",
          "category.keyword"
        ]
      }
    },
    "metrics": [
      {
        "field": "customer_birth_date",
        "metrics": [
          "max",
          "min",
          "value_count"
        ]
      },
      {
        "field": "day_of_week_i",
        "metrics": [
          "avg",
          "max",
          "min",
          "sum",
          "value_count"
        ]
      },
      {
        "field": "order_date",
        "metrics": [
          "max",
          "min",
          "value_count"
        ]
      },
      {
        "field": "products.price",
        "metrics": [
          "avg",
          "max",
          "min",
          "sum",
          "value_count"
        ]
      },
      {
        "field": "products.quantity",
        "metrics": [
          "avg",
          "max",
          "min",
          "sum",
          "value_count"
        ]
      }
    ],
    "timeout": "20s",
    "page_size": 1000
  },
  "status": {
    "job_state": "started",
    "current_position": {
      "category.keyword.terms": "Men's Clothing",
      "currency.terms": "EUR",
      "customer_phone.terms": "",
      "day_of_week.terms": "Tuesday",
      "day_of_week_i.histogram": 0,
      "day_of_week_i.terms": 1,
      "email.terms": "[email protected]",
      "order_date.date_histogram": 1580219160000,
      "products.price.histogram": 30,
      "total_quantity.histogram": 0
    }
  },
  "stats": {
    "pages_processed": 8,
    "documents_processed": 6481,
    "rollups_indexed": 6025,
    "trigger_count": 1,
    "index_time_in_ms": 963,
    "index_total": 7,
    "index_failures": 0,
    "search_time_in_ms": 605,
    "search_total": 8,
    "search_failures": 0
  }
}

  1. Create a new TSVB visualization and go into Panel Configuration tab
  2. Fill Index Patterns field. For my example I input rollup_kibana_sample_data_ecommerce value
  3. Set valid value for Time field
  4. Go to Data tab and select Count aggregation

Issues behavior:

  1. Chart should contain data, but I see 0 for the whole time period
    image
  2. In case of search by Rollup index we should enable only aggregations which are supported by Rollup search.
    image
@Bargs Bargs added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293
Copy link
Contributor

flash1293 commented Jan 30, 2020

@alexwizp Good catch! It seems like my migration PR fixes both problems: #55310

I guess this was introduced by this PR #52501 - the provided request facade works for the default search strategy, but not for the rollup strategy.
@LeeDr Does this qualify as a blocker for 7.6? It completely breaks TSVB for rollups. If yes I can backport #55310 to 7.6 branch as soon as it's merged into master.

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) labels Jan 30, 2020
@alexwizp
Copy link
Contributor Author

alexwizp commented Feb 5, 2020

Thank you @flash1293
fixed for version >7.7

@alexwizp alexwizp closed this as completed Feb 5, 2020
@flash1293
Copy link
Contributor

Just for the record, also fixed for 7.6 in a separate PR: #56525

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 Feature:TSVB TSVB (Time Series Visual Builder) regression Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants