Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
spring-projects-issues opened this issue Sep 10, 2015 · 2 comments · Fixed by #1962
Closed

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

spring-projects-issues opened this issue Sep 10, 2015 · 2 comments · Fixed by #1962
Assignees
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

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

@spring-projects-issues
Copy link
Author

István Nagy commented

Cannot update the description anymore, it contains some typos. Sorry for that. corrected it in the pull request's description if you would like to correct it

@spring-projects-issues
Copy link
Author

István Nagy commented

This implementation doesn't support nested fields at the moment

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: mapping Mapping and conversion infrastructure labels Dec 31, 2020
@sothawo sothawo self-assigned this Oct 15, 2021
sothawo added a commit that referenced this issue Oct 16, 2021
Original Pull Request #1962 
Closes #769
@sothawo sothawo added this to the 4.3 RC1 (2021.1.0) milestone Oct 16, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants