Skip to content

Painless script support for Cartesian Points #90182

@craigtaverner

Description

@craigtaverner

Description

Early draft versions of the work to Refactor GeoPoint and GeoShape with generics added some initial support for painless scripting. This was done by copying GeoPointFieldScript to CartesianPointFieldScript and then extracting common code into AbstractPointFieldScript. This work was dropped because it conflicted with other ongoing work on GeoPointFieldScript, as well as being seen as out of scope for the initial effort to develop aggregation support for Cartesian data.

Also, we found that the existing painless interface did not really need to differentiate between Geo and Cartesian, as it only considered points as being composed of two doubles. In theory it would be possible to change it to support both. However, that breaks backwards compatibility because the painless API explicitly names the full classes, including package and class names, and these are Geo specific. The ensuing discussion between the Geo and Painless sub-teams was captured in the document at https://docs.google.com/document/d/1IjSl8DhNFz75K1k4boNKXhTPWcU4up6rSX21AAucBTI/edit#heading=h.jp9wz279wlla

The proposed conclusion was to consider:

  • Leave the existing Geo support exactly as is for backwards compatibility
  • Consider developing a completely new painless API based on the new fields API being developed at the moment, and have this new API support Geo and Cartesian in a more future proof way.
  • If the above fails or is too complex, we can revert to just copying existing Geo support into a near-duplicate Cartesian support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/GeoIndexing, search aggregations of geo points and shapes:Core/Infra/ScriptingScripting abstractions, Painless, and Mustache>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Team:Core/InfraMeta label for core/infra team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions