Skip to content

[Feature Request] Support for object type fields in star-tree index #16730

@bharath-techie

Description

@bharath-techie

Is your feature request related to a problem? Please describe

Currently object fields are not supported as part of star-tree index.

For example nested.status and geoip.country_name etc as below are not supported currently.

{
    "settings": {
        "index.number_of_shards": 1,
        "index.composite_index": true
    },
    "mappings": {
        "composite": {
            "startree1": {
                "type": "star_tree",
                "config": {
                    "ordered_dimensions": [
                        {
                            "name": "nested.status"
                        },
                        {
                            "name": "geoip.country_name"
                        }
                    ],
                    "metrics": [
                        {
                            "name": "nested.status"
                        }
                    ]
                }
            }
        },
        "properties": {
            "nested": {
                "properties" : {
                    "status": {
                        "type": "integer"
                    }
                }
            },
            "geoip": {
                "properties": {
                    "country_name": {
                        "type": "keyword"
                    }
                }
            }
        }
    }
}

Describe the solution you'd like

We can check if the leaf child field as part of the nested field is one of the supported star tree mapper types.
For example nested.status and nested.keyword both belong to numeric type and keyword types respectively which are supported by star-tree index.

Secondly we must block array value fields as part of these fields. Here nested is of array type

{ "index" : { "_index" : "logs-2419985"  } }
{"@timestamp": [1706431663,1706431665], "nested": [{"status": 218}, {"status":219}], "size": 202}

We must block even if the child nested entries are of array type as below :
Here nested.nested1 is of array type

{ "index" : { "_index" : "logs-2419985"  } }
{"@timestamp": [1706431663,1706431665], "nested": { nested1: [{"status": 218}, {"status":219}]}, "size": 202}

Related component

Indexing:Performance

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions