Skip to content

Runtime field not working as expected in Discovers and Lens #147658

Open

Description

Kibana version:
8.6.0

Elasticsearch version:
8.6.0

Describe the bug:

  1. Created a runtime field - the preview shows the correct value
  2. The value of the runtime field in Discover is incorrect
  3. An aggregation, for example sum on the runtime field in a Lens table produces an incorrect value

Steps to reproduce:

Try to create a runtime field called actual_bytes

def actual_bytes = 0.0;
if (doc['causes.actual'].size() != 0){
    actual_bytes = doc['causes.actual'][0];
}
emit(actual_bytes);

Snippet of document:

    "causes": [
      {
        "probability": 0.01,
        "function": "high_sum",
        "function_description": "sum",
        "typical": [
          377.61130035049564
        ],
        "actual": [
          20000
        ],
        "field_name": "source.bytes",
        "over_field_name": "destination.geo.continent_name",
        "over_field_value": "Europe"
      }

Expected behavior:

Expect that the runtime field works as expected in Lens and Discover.

Screenshots (if relevant):

Runtime preview is correct
Screen Shot 2022-12-15 at 5 23 08 PM

Notice that the value of the runtime field in Discover is 0 whereas it should have been 20000 for the document in the screenshot
Screen Shot 2022-12-15 at 3 07 36 PM

Notice that an aggregation (sum) on the runtime field produces a null(?) value
Screen Shot 2022-12-15 at 3 08 15 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Feature:Runtime FieldsProject:RuntimeFieldsTeam:DataDiscoveryDiscover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)blockedbugFixes for quality problems that affect the customer experiencefeedback_neededimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:needs-researchThis issue requires some research before it can be worked on or estimated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions