mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-29 15:22:11 +00:00
Update README.md
This commit is contained in:
parent
35cb4e6930
commit
f220075b72
50
README.md
50
README.md
@ -174,6 +174,56 @@ Indexing multiple Document(bulk index) using Repository
|
|||||||
repository.save(sampleEntities);
|
repository.save(sampleEntities);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Geo indexing and request
|
||||||
|
|
||||||
|
You can make request using geo_distance filter. This can be done using GeoPoint object.
|
||||||
|
|
||||||
|
First, here is a sample of an entity with a GeoPoint field
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Document(indexName = "test-geo-index", type = "geo-class-point-type")
|
||||||
|
public class AuthorMarkerEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private GeoPoint location;
|
||||||
|
|
||||||
|
private AuthorMarkerEntity(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuthorMarkerEntity(String id){
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GeoPoint getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation(GeoPoint location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### XML Namespace
|
### XML Namespace
|
||||||
|
|
||||||
You can set up repository scanning via xml configuration, which will happily create your repositories.
|
You can set up repository scanning via xml configuration, which will happily create your repositories.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user