-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
status: worked ona contributor is working on this issuea contributor is working on this issuetype: enhancementA general enhancementA general enhancement
Milestone
Description
Elastic supports storing values in fields which contain dots (e.g. "foo.bar") (see elastic/elasticsearch#15951).
Unfortunately, spring-data-elasticsearch does not seem to support mapping such dot-containing field values using the @Field-annotation.
Cause is following lines:
Lines 1422 to 1425 in d95af9f
if (!fieldName.contains(".")) { | |
return target.get(fieldName); | |
} | |
The dot "." is (understandably) used for navigating the object graph.
Unfortunately the @Field-annotation does not allow overriding such behaviour (e.g. with a "navigateObjectGraphUsingDot=false" parameter or something similar).
Steps to reproduce:
- Store document containing a field which contains a dot (e.g. "foo.bar")
- Create document mapping using spring-data-elasticsearch using @field("foo.bar")
- Read documents with a repository
Behaviour:
The value of the entity which is mapped with @field("foo.bar") is null and does not contain the actual value from the elastic document
Metadata
Metadata
Assignees
Labels
status: worked ona contributor is working on this issuea contributor is working on this issuetype: enhancementA general enhancementA general enhancement