Closed
Description
org.springframework.data.elasticsearch.core.suggest.Completion
has no parameterless constructor
use jackson load JSON to Completion, throws InvalidDefinitionException
should we add a parameterless constructor?
class:
@Document(indexName = "trending")
@Setting(settingPath = "elasticsearch/settings/default.json")
@Data
@NoArgsConstructor
@FieldNameConstants
public class Trending {
@Id
private String id;
@CompletionField
private Completion suggest;
}
error:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.springframework.data.elasticsearch.core.suggest.Completion` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)