I'm trying to use elasticsearch for geo location search. It works fine so
using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the results.
Is it possible somehow to add the distance to the result? Can someone give
me an example or point me to some docs how to make it?
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works fine so
using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works fine so
using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
I look at that posting already, and i am already sorting by _geo_distance
but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we need to
use script_fields to get distance to the results and i am wondering why in
many places it is mentioned that distance should be in results if you are
sorting by _geo_distance if it is not?! Maybe i am doing something wrong,
but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works fine
so using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by _geo_distance
but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we need to
use script_fields to get distance to the results and i am wondering why in
many places it is mentioned that distance should be in results if you are
sorting by _geo_distance if it is not?! Maybe i am doing something wrong,
but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works fine
so using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
So i think there is a bug somewhere with geo-search, so i reported whole
test case to github issues
Because if you look at my test case: Elasticsearch geo search debug · GitHub
You will see that returned "sort" values are almost identical and also
returned sort order is wrong...
Thanks, it is good to know "sort" actually should return distance, let's
hope there is some explanation why problems in my test case appears.
On Tuesday, April 24, 2012 11:01:23 PM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by _geo_distance
but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we need
to use script_fields to get distance to the results and i am wondering why
in many places it is mentioned that distance should be in results if you
are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works fine
so using a filtered query and the geo_distance filter. What I miss in the
search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Yeah, it's one of these gotchas that many people run into. When you specify
location as an array, it follows GeoJson format [lon, lat], instead of lat,
lon. So, if you will flip the numbers in _geo_distance sort location, it
will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
Because if you look at my test case: Elasticsearch geo search debug · GitHub
You will see that returned "sort" values are almost identical and also
returned sort order is wrong...
Thanks, it is good to know "sort" actually should return distance, let's
hope there is some explanation why problems in my test case appears.
On Tuesday, April 24, 2012 11:01:23 PM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we need
to use script_fields to get distance to the results and i am wondering why
in many places it is mentioned that distance should be in results if you
are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works
fine so using a filtered query and the geo_distance filter. What I miss in
the search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Wow, thanks. I spent half a day running tests, googling and finally decided
it could be a bug and even reported.
There should be some warning or exclamation marks like "Important notice" on
docs where it mentions format changes it too easy to mis-read lat, lon
vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
Because if you look at my test case: Elasticsearch geo search debug · GitHub
You will see that returned "sort" values are almost identical and also
returned sort order is wrong...
Thanks, it is good to know "sort" actually should return distance, let's
hope there is some explanation why problems in my test case appears.
On Tuesday, April 24, 2012 11:01:23 PM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we need
to use script_fields to get distance to the results and i am wondering why
in many places it is mentioned that distance should be in results if you
are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works
fine so using a filtered query and the geo_distance filter. What I miss in
the search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
On Tuesday, April 24, 2012 5:19:50 PM UTC-4, Kaspars Sprogis wrote:
Wow, thanks. I spent half a day running tests, googling
and finally decided it could be a bug and even reported.
There should be some warning or exclamation marks like *"Important notice"
on docs where it mentions format changes it too easy to mis-read
lat, lon vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
Because if you look at my test case: Elasticsearch geo search debug · GitHub
You will see that returned "sort" values are almost identical and also
returned sort order is wrong...
Thanks, it is good to know "sort" actually should return distance, let's
hope there is some explanation why problems in my test case appears.
On Tuesday, April 24, 2012 11:01:23 PM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we
need to use script_fields to get distance to the results and i am wondering
why in many places it is mentioned that distance should be in results if
you are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works
fine so using a filtered query and the geo_distance filter. What I miss in
the search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
I'll explore how the docs are built and see what i can do. As i already
have all the test data for geo search probably tutorial on geo search could
be a help too. As i did lot of search yesterday, i noticed all the same
questions all around about geo search. As kimchy added support for Latvian
stemming after one day i wrote an issue (which was essential one for us
choosing ES) and released this feature in a week in new version i think i
owe this community some help too
On Wednesday, April 25, 2012 12:34:35 AM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 5:19:50 PM UTC-4, Kaspars Sprogis wrote:
Wow, thanks. I spent half a day running tests, googling
and finally decided it could be a bug and even reported.
There should be some warning or exclamation marks like "Important
notice" on docs where it mentions format changes it too easy to
mis-read lat, lon vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
Because if you look at my test case: Elasticsearch geo search debug · GitHub
You will see that returned "sort" values are almost identical and also
returned sort order is wrong...
Thanks, it is good to know "sort" actually should return distance,
let's hope there is some explanation why problems in my test case appears.
On Tuesday, April 24, 2012 11:01:23 PM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we
need to use script_fields to get distance to the results and i am wondering
why in many places it is mentioned that distance should be in results if
you are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias Nothhaft
wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works
fine so using a filtered query and the geo_distance filter. What I miss in
the search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Heya, the formatting is specified here for example: Elasticsearch Platform — Find real-time answers at scale | Elastic. Its hard
to find, I know..., and to be honest its confusing (the order) for me as
well, it used to be the other way around, but we changed it to match the
geojson spec.
On Wed, Apr 25, 2012 at 7:51 AM, Kaspars Sprogis darklow@gmail.com wrote:
I'll explore how the docs are built and see what i can do. As i already
have all the test data for geo search probably tutorial on geo search could
be a help too. As i did lot of search yesterday, i noticed all the same
questions all around about geo search. As kimchy added support for Latvian
stemming after one day i wrote an issue (which was essential one for us
choosing ES) and released this feature in a week in new version i think i
owe this community some help too
On Wednesday, April 25, 2012 12:34:35 AM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 5:19:50 PM UTC-4, Kaspars Sprogis wrote:
Wow, thanks. I spent half a day running tests, googling
and finally decided it could be a bug and even reported.
There should be some warning or exclamation marks like "Important
notice" on docs where it mentions format changes it too easy to
mis-read lat, lon vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost identical
(event if distance is different) i decided sort key is something different,
some value of inner calculations.
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we
need to use script_fields to get distance to the results and i am wondering
why in many places it is mentioned that distance should be in results if
you are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias
Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It works
fine so using a filtered query and the geo_distance filter. What I miss in
the search result is the distance between "my location" and each of the
results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
The problem was not to found the correct guide page, but to notice that in
one place order of arguments differs from usual one (lat,lon, which uses
for storing, also google uses it) so it is very easy to mis-read it.
Yesterday i set up ES docs on ruby, so that i can contribute some guide
updates. Kimchy, do you agree that in place where lat, lon is way around
there should be some visually more noticeable Note element, so that users
really notice these changes? If you agree on that i can do that and
contribute.
On Friday, April 27, 2012 11:57:03 AM UTC+3, kimchy wrote:
Heya, the formatting is specified here for example: Elasticsearch Platform — Find real-time answers at scale | Elastic. Its
hard to find, I know..., and to be honest its confusing (the order) for me
as well, it used to be the other way around, but we changed it to match the
geojson spec.
On Wed, Apr 25, 2012 at 7:51 AM, Kaspars Sprogis wrote:
I'll explore how the docs are built and see what i can do. As i already
have all the test data for geo search probably tutorial on geo search could
be a help too. As i did lot of search yesterday, i noticed all the same
questions all around about geo search. As kimchy added support for Latvian
stemming after one day i wrote an issue (which was essential one for us
choosing ES) and released this feature in a week in new version i think i
owe this community some help too
On Wednesday, April 25, 2012 12:34:35 AM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 5:19:50 PM UTC-4, Kaspars Sprogis wrote:
Wow, thanks. I spent half a day running tests, googling
and finally decided it could be a bug and even reported.
There should be some warning or exclamation marks like "Important
notice" on docs where it mentions format changes it too easy to
mis-read lat, lon vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost
identical (event if distance is different) i decided sort key is something
different, some value of inner calculations.
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we
need to use script_fields to get distance to the results and i am wondering
why in many places it is mentioned that distance should be in results if
you are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias
Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It
works fine so using a filtered query and the geo_distance filter. What I
miss in the search result is the distance between "my location" and each of
the results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
Yes, I definitely agree that it should be noticeable. I thought that it is
(there is a special note in that format).
On Fri, Apr 27, 2012 at 12:03 PM, Kaspars Sprogis darklow@gmail.com wrote:
The problem was not to found the correct guide page, but to notice that in
one place order of arguments differs from usual one (lat,lon, which uses
for storing, also google uses it) so it is very easy to mis-read it.
Yesterday i set up ES docs on ruby, so that i can contribute some guide
updates. Kimchy, do you agree that in place where lat, lon is way around
there should be some visually more noticeable Note element, so that users
really notice these changes? If you agree on that i can do that and
contribute.
On Friday, April 27, 2012 11:57:03 AM UTC+3, kimchy wrote:
On Wed, Apr 25, 2012 at 7:51 AM, Kaspars Sprogis wrote:
I'll explore how the docs are built and see what i can do. As i already
have all the test data for geo search probably tutorial on geo search could
be a help too. As i did lot of search yesterday, i noticed all the same
questions all around about geo search. As kimchy added support for Latvian
stemming after one day i wrote an issue (which was essential one for us
choosing ES) and released this feature in a week in new version i think i
owe this community some help too
On Wednesday, April 25, 2012 12:34:35 AM UTC+3, Igor Motov wrote:
On Tuesday, April 24, 2012 5:19:50 PM UTC-4, Kaspars Sprogis wrote:
Wow, thanks. I spent half a day running tests, googling
and finally decided it could be a bug and even reported.
There should be some warning or exclamation marks like "Important
notice" on docs where it mentions format changes it too easy to
mis-read lat, lon vs lon, lat.
Thanks a lot.
On Wednesday, April 25, 2012 12:02:44 AM UTC+3, Igor Motov wrote:
Yeah, it's one of these gotchas that many people run into. When you
specify location as an array, it follows GeoJson format [lon, lat], instead
of lat, lon. So, if you will flip the numbers in _geo_distance sort
location, it will work as expected:
On Tuesday, April 24, 2012 4:19:53 PM UTC-4, Kaspars Sprogis wrote:
Since in my test case all returned "sort" fields were almost
identical (event if distance is different) i decided sort key is something
different, some value of inner calculations.
On Tuesday, April 24, 2012 2:55:58 PM UTC-4, Kaspars Sprogis wrote:
I look at that posting already, and i am already sorting by
_geo_distance but no actual distance value is returned (using latest 0.9.2)
Then only in once place somewhere on stackoverflow i found that we
need to use script_fields to get distance to the results and i am wondering
why in many places it is mentioned that distance should be in results if
you are sorting by _geo_distance if it is not?! Maybe i am doing something
wrong, but i tested thousand times.
Am Dienstag, 24. April 2012 19:51:59 UTC+2 schrieb Kaspars
Sprogis:
I am also interested in this. Can anyone help? Thanks
On Wednesday, September 7, 2011 6:58:47 PM UTC+3, Matthias
Nothhaft wrote:
Hi,
I'm trying to use elasticsearch for geo location search. It
works fine so using a filtered query and the geo_distance filter. What I
miss in the search result is the distance between "my location" and each of
the results. Is it possible somehow to add the distance to the result? Can
someone give me an example or point me to some docs how to make it?
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.