File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,56 @@ Indexing multiple Document(bulk index) using Repository
174
174
repository. save(sampleEntities);
175
175
```
176
176
177
+ ### Geo indexing and request
178
+
179
+ You can make request using geo_distance filter. This can be done using GeoPoint object.
180
+
181
+ First, here is a sample of an entity with a GeoPoint field
182
+
183
+ ``` java
184
+ @Document (indexName = " test-geo-index" , type = " geo-class-point-type" )
185
+ public class AuthorMarkerEntity {
186
+
187
+ @Id
188
+ private String id;
189
+ private String name;
190
+
191
+ private GeoPoint location;
192
+
193
+ private AuthorMarkerEntity (){
194
+ }
195
+
196
+ public AuthorMarkerEntity (String id ){
197
+ this . id = id;
198
+ }
199
+
200
+ public String getId () {
201
+ return id;
202
+ }
203
+
204
+ public void setId (String id ) {
205
+ this . id = id;
206
+ }
207
+
208
+ public String getName () {
209
+ return name;
210
+ }
211
+
212
+ public void setName (String name ) {
213
+ this . name = name;
214
+ }
215
+
216
+ public GeoPoint getLocation () {
217
+ return location;
218
+ }
219
+
220
+ public void setLocation (GeoPoint location ) {
221
+ this . location = location;
222
+ }
223
+ }
224
+ ```
225
+
226
+
177
227
### XML Namespace
178
228
179
229
You can set up repository scanning via xml configuration, which will happily create your repositories.
You can’t perform that action at this time.
0 commit comments