|
15 | 15 | */
|
16 | 16 | package org.springframework.data.elasticsearch.core;
|
17 | 17 |
|
18 |
| -import static org.apache.commons.lang.StringUtils.*; |
19 |
| -import static org.elasticsearch.common.xcontent.XContentFactory.*; |
20 |
| -import static org.springframework.util.StringUtils.*; |
21 |
| - |
22 | 18 | import java.io.IOException;
|
23 | 19 | import java.util.ArrayList;
|
24 | 20 | import java.util.Arrays;
|
25 | 21 | import java.util.List;
|
26 | 22 | import java.util.Map;
|
27 |
| - |
28 |
| -import org.apache.commons.lang.StringUtils; |
29 |
| -import org.apache.commons.lang.math.NumberUtils; |
30 | 23 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
31 | 24 | import org.springframework.core.ResolvableType;
|
32 | 25 | import org.springframework.core.io.ClassPathResource;
|
33 | 26 | import org.springframework.data.annotation.Transient;
|
34 |
| -import org.springframework.data.elasticsearch.annotations.*; |
| 27 | +import org.springframework.data.elasticsearch.annotations.CompletionField; |
| 28 | +import org.springframework.data.elasticsearch.annotations.DateFormat; |
35 | 29 | import org.springframework.data.elasticsearch.annotations.Field;
|
| 30 | +import org.springframework.data.elasticsearch.annotations.FieldType; |
| 31 | +import org.springframework.data.elasticsearch.annotations.GeoPointField; |
| 32 | +import org.springframework.data.elasticsearch.annotations.InnerField; |
| 33 | +import org.springframework.data.elasticsearch.annotations.Mapping; |
| 34 | +import org.springframework.data.elasticsearch.annotations.MultiField; |
36 | 35 | import org.springframework.data.elasticsearch.core.completion.Completion;
|
37 | 36 | import org.springframework.data.elasticsearch.core.geo.GeoPoint;
|
38 | 37 | import org.springframework.data.mapping.model.SimpleTypeHolder;
|
39 | 38 | import org.springframework.data.util.ClassTypeInformation;
|
40 | 39 | import org.springframework.data.util.TypeInformation;
|
| 40 | +import static org.apache.commons.lang.StringUtils.*; |
| 41 | +import static org.elasticsearch.common.xcontent.XContentFactory.*; |
| 42 | +import static org.springframework.util.StringUtils.*; |
41 | 43 |
|
42 | 44 | /**
|
43 | 45 | * @author Rizwan Idrees
|
@@ -190,21 +192,6 @@ private static boolean isAnnotated(java.lang.reflect.Field field) {
|
190 | 192 | private static void applyGeoPointFieldMapping(XContentBuilder xContentBuilder, java.lang.reflect.Field field) throws IOException {
|
191 | 193 | xContentBuilder.startObject(field.getName());
|
192 | 194 | xContentBuilder.field(FIELD_TYPE, TYPE_VALUE_GEO_POINT);
|
193 |
| - |
194 |
| - GeoPointField annotation = field.getAnnotation(GeoPointField.class); |
195 |
| -// if (annotation != null) { |
196 |
| -// if (annotation.geoHashPrefix()) { |
197 |
| -// xContentBuilder.field(TYPE_VALUE_GEO_HASH_PREFIX, true); |
198 |
| -// if (StringUtils.isNotEmpty(annotation.geoHashPrecision())) { |
199 |
| -// if (NumberUtils.isNumber(annotation.geoHashPrecision())) { |
200 |
| -// xContentBuilder.field(TYPE_VALUE_GEO_HASH_PRECISION, Integer.parseInt(annotation.geoHashPrecision())); |
201 |
| -// } else { |
202 |
| -// xContentBuilder.field(TYPE_VALUE_GEO_HASH_PRECISION, annotation.geoHashPrecision()); |
203 |
| -// } |
204 |
| -// } |
205 |
| -// } |
206 |
| -// } |
207 |
| - |
208 | 195 | xContentBuilder.endObject();
|
209 | 196 | }
|
210 | 197 |
|
|
0 commit comments