Skip to content

Support for field exclusion from source [DATAES-195] #769

Closed
@spring-projects-issues

Description

@spring-projects-issues

István Nagy opened DATAES-195 and commented

Elasticsearch allows us to specify field level exclusions when creating a mapping. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html#include-exclude

This functionality allows us to create a so called "indexed but not stored" kind of document fields. The @Field annotations existing store attribute is not equivalent with this.

Spring Data ES currently lacks this feature in the document annotations, It should be possible to enable it using a custom mapping configuration file however it would be more expressive to specify this on the @Field annotation directly.

Eg.:

code
@Field(type = FieldType.String, excludeFromSource = true)
private String indexOnlyField;
code

The referenced pull request implements this feature


Referenced from: pull request #117

1 votes, 2 watchers

Metadata

Metadata

Assignees

Labels

in: mappingMapping and conversion infrastructuretype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions