Skip to content

Script: fields API for x-pack constant_keyword#82292

Merged
stu-elastic merged 3 commits intoelastic:masterfrom
stu-elastic:pain_field_constant_keyword
Jan 6, 2022
Merged

Script: fields API for x-pack constant_keyword#82292
stu-elastic merged 3 commits intoelastic:masterfrom
stu-elastic:pain_field_constant_keyword

Conversation

@stu-elastic
Copy link
Copy Markdown
Contributor

Adds the fields API for the constant_keyword field mapper

Moves implementation to AbstractKeywordDocValuesField, allowing
code sharing with KeywordDocValuesField.

API:

field('const').get('default')
field('const').get(0, 'default')

Refs: #79105

Adds the fields API for the constant_keyword field mapper

Moves implementation to `AbstractKeywordDocValuesField`, allowing
code sharing with `KeywordDocValuesField`.

API:
```
field('const').get('default')
field('const').get('default', 0)
```

Refs: elastic#79105
@stu-elastic stu-elastic added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v8.1.0 labels Jan 5, 2022
@stu-elastic stu-elastic requested a review from jdconrad January 5, 2022 23:27
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jan 5, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @stu-elastic, I've created a changelog YAML for you.

Copy link
Copy Markdown
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

LGTM!

@stu-elastic stu-elastic merged commit d570656 into elastic:master Jan 6, 2022
astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
* Script: fields API for x-pack constant_keyword

Adds the fields API for the constant_keyword field mapper

Moves implementation to `AbstractKeywordDocValuesField`, allowing
code sharing with `KeywordDocValuesField`.

API:
```
field('const').get('default')
field('const').get(0, 'default')
```

Refs: elastic#79105
astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
* Script: fields API for x-pack constant_keyword

Adds the fields API for the constant_keyword field mapper

Moves implementation to `AbstractKeywordDocValuesField`, allowing
code sharing with `KeywordDocValuesField`.

API:
```
field('const').get('default')
field('const').get(0, 'default')
```

Refs: elastic#79105
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