Skip to content

[ML] Data frame analytics - exclude fields from dest index #49531

@LucaWintergerst

Description

@LucaWintergerst

Describe the feature:
Data frame analytics always reindexes all fields of an index. While it is possible to exclude individual documents, it is not possible to exclude a set of fields from being written to the dest index.

For outlier detection only numeric fields are required for analytics. However, all text fields also get copied to the output index.

I suggest adding _source filtering as part of the source definition like this.

PUT _ml/data_frame/analytics/test1
{
  "id": "test1",
  "source": {
    "index": [
      "demo-airbnb-listings-munich"
    ],
    "query": {
      "match_all": {}
    },
    "_source": { 
      "excludes": [ "foobar" ] 
    }
  },
  ...
}

This way the behaviour would be consistent with source filtering in queries or when using _reindex.

This is easy to implement too as we can make use of source filtering in the _reindex request that we make

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions