Springboot integration Elasticsearch @Filed fails

The springboot version is 2.3.12.RELEASE, the Elasticsearch client uses 7.6.2, and the corresponding spring data Elasticsearch is 4.0.9

Now when using the officially provided ElasticsearchRepository interface to save data, there is an ESInfraredOriginal class. This class has the @Document (indexName = "infrared-original") annotation, and each attribute has the @Field annotation.

I used the controller to test and the index was created, but why is the type different? My annotation @field specifies type, why does it not take effect? Why are the types of Elasticsearch different?


Did you delete the index before restarting your code?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.