Hi all. I want to be able to search with geo distance in ES 1.3.4.
I did geo mapping:
POST /geo/
{ "mappings":{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
Added some data in this format:
PUT /geo/location/1
{
"pin" : {
"location" : {
"lat" : 42.4398181,
"lon" : 21.466074
},
"text" : "Geolocation distance search"
}
}
Tried to search with geo_distance filter:
POST geo/location/_search
{
"query": {"filtered": {
"query": {
"match_all": {}},
"filter": {
"geo_distance": {
"distance": "500",
"distance_unit": "km",
"pin.location": {
"lat" : 42.1,
"lon" : 21.1
}
}
}
}}
}
And always getting 0 results even that this distance is 48.32 km.
I tried many options and ES always returns 0 results to me.
( I used sense extension above)
Hi all. I want to be able to search with geo distance in ES 1.3.4.
I did geo mapping:
POST /geo/
{ "mappings":{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
Added some data in this format:
PUT /geo/location/1
{
"pin" : {
"location" : {
"lat" : 42.4398181,
"lon" : 21.466074
},
"text" : "Geolocation distance search"
}
}
Tried to search with geo_distance filter:
POST geo/location/_search
{
"query": {"filtered": {
"query": {
"match_all": {}},
"filter": {
"geo_distance": {
"distance": "500",
"distance_unit": "km",
"pin.location": {
"lat" : 42.1,
"lon" : 21.1
}
}
}
}}
}
And always getting 0 results even that this distance is 48.32 km.
I tried many options and ES always returns 0 results to me.
( I used sense extension above)
On Sunday, October 19, 2014 8:07:12 PM UTC+2, David Pilato wrote:
It sounds like you created a mapping for type pin but sent documents with
location type.
I'd check the index creation command. Check the mapping for location.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 19 oct. 2014 à 18:51, Driton Alija <driton...@gmail.com <javascript:>>
a écrit :
Hi all. I want to be able to search with geo distance in ES 1.3.4.
I did geo mapping:
POST /geo/
{ "mappings":{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
Added some data in this format:
PUT /geo/location/1
{
"pin" : {
"location" : {
"lat" : 42.4398181,
"lon" : 21.466074
},
"text" : "Geolocation distance search"
}
}
Tried to search with geo_distance filter:
POST geo/location/_search
{
"query": {"filtered": {
"query": {
"match_all": {}},
"filter": {
"geo_distance": {
"distance": "500",
"distance_unit": "km",
"pin.location": {
"lat" : 42.1,
"lon" : 21.1
}
}
}
}}
}
And always getting 0 results even that this distance is 48.32 km.
I tried many options and ES always returns 0 results to me.
( I used sense extension above)
Here is the attachment from the mapping that I did.
I appreciate your help.
On Sunday, October 19, 2014 8:07:12 PM UTC+2, David Pilato wrote:
It sounds like you created a mapping for type pin but sent documents with location type.
I'd check the index creation command. Check the mapping for location.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Hi all. I want to be able to search with geo distance in ES 1.3.4.
I did geo mapping:
POST /geo/
{ "mappings":{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
Added some data in this format:
PUT /geo/location/1
{
"pin" : {
"location" : {
"lat" : 42.4398181,
"lon" : 21.466074
},
"text" : "Geolocation distance search"
}
}
Tried to search with geo_distance filter:
POST geo/location/_search
{
"query": {"filtered": {
"query": {
"match_all": {}},
"filter": {
"geo_distance": {
"distance": "500",
"distance_unit": "km",
"pin.location": {
"lat" : 42.1,
"lon" : 21.1
}
}
}
}}
}
And always getting 0 results even that this distance is 48.32 km.
I tried many options and ES always returns 0 results to me.
( I used sense extension above)
Hi all. I want to be able to search with geo distance in ES 1.3.4.
I did geo mapping:
POST /geo/
{ "mappings":{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
Added some data in this format:
PUT /geo/location/1
{
"pin" : {
"location" : {
"lat" : 42.4398181,
"lon" : 21.466074
},
"text" : "Geolocation distance search"
}
}
Tried to search with geo_distance filter:
POST geo/location/_search
{
"query": {"filtered": {
"query": {
"match_all": {}},
"filter": {
"geo_distance": {
"distance": "500",
"distance_unit": "km",
"pin.location": {
"lat" : 42.1,
"lon" : 21.1
}
}
}
}}
}
And always getting 0 results even that this distance is 48.32 km.
I tried many options and ES always returns 0 results to me.
( I used sense extension above)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.