Glad to hear you resolved your issue. Let us know if you have any other
questions.
- Nick
On Thursday, December 4, 2014 12:04:14 PM UTC-6, T Vinod Gupta wrote:
>
> nevermind, i solved it by doing something like this -
> GeoPoint latLng = GeoPoint.parseFromLatLon((String)
> sourceMap.get("lat_lng"));
>
> at the time of indexing, i am passing as "<lat>,<lng>"
>
> earlier i was passing as GeoPoint but that caused a major problem and
> messed up my mapping. When i read the document and then change some other
> field and do index, then it would raise this exception -
> ElasticsearchParseException("field must be either '" + LATITUDE + "', '" +
> LONGITUDE + "' or '" + GEOHASH + "'");
>
> so i figured that indexing by passing the string (even though mapping is
> geo_point) works.
> thanks
>
> On Thu, Dec 4, 2014 at 6:32 AM, Nicholas Knize <
> [email protected] <javascript:>> wrote:
>
>> Can you post a code example from your use case for how you're inserting,
>> retrieving, and reading the documents?
>>
>> - Nick
>>
>>
>> On Tuesday, December 2, 2014 2:16:30 PM UTC-6, T Vinod Gupta wrote:
>>>
>>> has anyone seen this problem? my mapping says that the field is of type
>>> geo_point. but when i read documents using java api and get the sourcemap,
>>> the type of the field is string and i can't cast it to a GeoPoint.
>>>
>>> ...
>>> "lat_lng" : {
>>> "type" : "geo_point",
>>> "lat_lon" : true
>>> },
>>> ..
>>>
>>> thanks
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/b5ed03a4-eaad-491b-9856-087ae3ab2587%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/elasticsearch/b5ed03a4-eaad-491b-9856-087ae3ab2587%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/138a1355-7815-4afa-915d-924332ce494a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.