Skip to content

Consider Document as simple type #1675

New issue

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

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

Already on GitHub? Sign in to your account

Closed
crazyjurich opened this issue Feb 1, 2021 · 2 comments
Closed

Consider Document as simple type #1675

crazyjurich opened this issue Feb 1, 2021 · 2 comments
Assignees
Labels
type: task A general task

Comments

@crazyjurich
Copy link

Adding spring-data-elasticsearch to spring project causes multiple warnings in app log, like:
o.s.d.c.CustomConversions - Registering converter from class org.springframework.data.elasticsearch.core.geo.GeoJsonMultiPoint to interface java.util.Map as writing converter although it doesn't convert to a store-supported type! You might want to check your annotation setup at the converter implementation.
More log lines here: log.txt

First of all app shouldn't behave like this, especially considering these converters are not used. And secondly, error message looks irrelevant for me, looks like it was initially created for user converters.

Related classes are:
org/springframework/data/convert/CustomConversions.java
org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java

Workaround: https://stackoverflow.com/questions/60001034/how-to-remove-spring-data-customconversions-warnings-from-application-startup

Related issue: spring-projects/spring-data-commons#2043

@mp911de mp911de transferred this issue from spring-projects/spring-data-commons Feb 1, 2021
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 1, 2021
@mp911de mp911de changed the title Geo converters of spring-data-elasticsearch produce Warning spam in log on startup Consider Document as simple type Feb 1, 2021
@mp911de mp911de self-assigned this Feb 1, 2021
@mp911de mp911de added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 1, 2021
@mp911de
Copy link
Member

mp911de commented Feb 1, 2021

Part of the solution is contributed by #1676.

mp911de added a commit that referenced this issue Feb 1, 2021
Document is now a simple type that can be used as target type for complex objects. Writing GeoConverters now serialize objects as Document instead of Map. Since Jackson considers Map-like types as JSON objects, we can safely use Document.

Resolves #1675.
mp911de added a commit that referenced this issue Feb 1, 2021
Fix PersistenceConstructor of Completion to accept the property type String[].

See #1675.
@mp911de mp911de linked a pull request Feb 1, 2021 that will close this issue
mp911de added a commit that referenced this issue Feb 2, 2021
We now no longer rely on isSimpleType when writing Maps. This is the preparation to consider Map as simple type.

See #1675.
mp911de added a commit that referenced this issue Feb 2, 2021
mp911de added a commit that referenced this issue Feb 2, 2021
mp911de added a commit that referenced this issue Feb 2, 2021
We now no longer rely on isSimpleType when writing Maps. This is the preparation to consider Map as simple type.

See #1675.
mp911de added a commit that referenced this issue Feb 2, 2021
mp911de added a commit that referenced this issue Feb 2, 2021
mp911de added a commit that referenced this issue Feb 3, 2021
* Add support for SpEL expressions via @value.
* Simplify readCollectionOrArray to consider properly nested lists and maps
* Simplify readMap to allow reading generic maps and entities in maps.
* Report a fallback TypeInformation in DefaultElasticsearchTypeMapper to properly convert nested maps.

We now no longer rely on isSimpleType when writing Maps. This is the preparation to consider Map as simple type.

Resolves #1676.
See #1675.
mp911de added a commit that referenced this issue Feb 3, 2021
Fix PersistenceConstructor of Completion to accept the property type String[].

See #1675.
mp911de added a commit that referenced this issue Feb 3, 2021
sothawo pushed a commit that referenced this issue Feb 4, 2021
* Add support for SpEL expressions via @value.
* Simplify readCollectionOrArray to consider properly nested lists and maps
* Simplify readMap to allow reading generic maps and entities in maps.
* Report a fallback TypeInformation in DefaultElasticsearchTypeMapper to properly convert nested maps.

We now no longer rely on isSimpleType when writing Maps. This is the preparation to consider Map as simple type.

Resolves #1676.
See #1675.

(cherry picked from commit 877de9c)
sothawo pushed a commit that referenced this issue Feb 4, 2021
Fix PersistenceConstructor of Completion to accept the property type String[].

See #1675.

(cherry picked from commit bb3c006)
sothawo pushed a commit that referenced this issue Feb 4, 2021
See #1675.

(cherry picked from commit 27850e9)
@sothawo
Copy link
Collaborator

sothawo commented Feb 4, 2021

closed with #1677

@sothawo sothawo closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants