Skip to content

Conversation

@jdconrad
Copy link
Contributor

This change adds infrastructure for GeoShape making it accessible via the new scripting fields API. This does not add any methods outside of get at this point in time since it needs additional thought/discussion on what makes sense similar to GeoPoints. Note that because GeoShape does not support XContent this is just a skeleton that currently supports getScriptDocValues.

@jdconrad jdconrad added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v8.1.0 labels Dec 10, 2021
@jdconrad jdconrad requested a review from stu-elastic December 10, 2021 00:20
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Dec 10, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Hi @jdconrad, I've created a changelog YAML for you.

private static final List<Whitelist> WHITELISTS = List.of(
WhitelistLoader.loadFromResourceFiles(
SpatialPainlessExtension.class,
"org.elasticsearch.xpack.spatial.index.fielddata.txt",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why split these across three different files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it easier to find the classes when they're separated out by package. I realize there's not a huge amount allow-listed here, yet, but I think we want to expand this quite a bit.


public static class GeoShapeDocValuesField
implements
DocValuesField<GeoShapeValues.GeoShapeValue>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this formatting intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess so since this is what spotless produced.

Copy link
Contributor

@stu-elastic stu-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice infrastructure.

@jdconrad
Copy link
Contributor Author

jdconrad commented Jan 4, 2022

@stu-elastic Thanks for the review! Will commit as soon as CI passes.

@jdconrad jdconrad merged commit 60e08fd into elastic:master Jan 4, 2022
astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
This change adds infrastructure for GeoShape making it accessible via the new scripting fields API. 
This does not add any methods outside of get at this point in time since it needs additional 
thought/discussion on what makes sense similar to GeoPoints. Note that because GeoShape does 
not support XContent this is just a skeleton that currently supports getScriptDocValues.
astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
This change adds infrastructure for GeoShape making it accessible via the new scripting fields API. 
This does not add any methods outside of get at this point in time since it needs additional 
thought/discussion on what makes sense similar to GeoPoints. Note that because GeoShape does 
not support XContent this is just a skeleton that currently supports getScriptDocValues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants