1
まず:私はSpringbootプロジェクトで、次のバージョンを使用
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
私のクラスでは、このようなものです:
//@GeoPointField
private GeoPoint location;
//@Field(index = FieldIndex.not_analyzed)
private String userId;
私は注釈を使用し、 esマッピングの場所は次のようになります。
"location": {
"properties": {
"lon": {
"type": "double"
},
"lat": {
"type": "double"
}
}
}
私がしたいものは:location'type is geo_pointです。
もちろん、@ Id以外のすべての注釈を削除するとしました。
しかし、私は注釈にいくつかの機能を実行したい、いくつかのアイデアを与えてください。