Testing with the example query from the docs site works for me:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"LOCATION": {
"lat": 13.408,
"lon": 52.5186
},
"precision": 3,
"neighbors": true
}
}
}
}
}
So I think mapping and indexing is right. Then I wanted to filter not by
point and precision but directly by geohash (as found in the issue 3218),
but this aint working
Testing with the example query from the docs site works for me:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"LOCATION": {
"lat": 13.408,
"lon": 52.5186
},
"precision": 3,
"neighbors": true
}
}
}
}
}
So I think mapping and indexing is right. Then I wanted to filter not by
point and precision but directly by geohash (as found in the issue 3218),
but this aint working
Testing with the example query from the docs site works for me:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"LOCATION": {
"lat": 13.408,
"lon": 52.5186
},
"precision": 3,
"neighbors": true
}
}
}
}
}
So I think mapping and indexing is right. Then I wanted to filter not by
point and precision but directly by geohash (as found in the issue 3218),
but this aint working
Testing with the example query from the docs site works for me:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"LOCATION": {
"lat": 13.408,
"lon": 52.5186
},
"precision": 3,
"neighbors": true
}
}
}
}
}
So I think mapping and indexing is right. Then I wanted to filter not by
point and precision but directly by geohash (as found in the issue 3218),
but this aint working
Testing with the example query from the docs site works for me:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"LOCATION": {
"lat": 13.408,
"lon": 52.5186
},
"precision": 3,
"neighbors": true
}
}
}
}
}
So I think mapping and indexing is right. Then I wanted to filter not
by point and precision but directly by geohash (as found in the issue
3218), but this aint working
may I ask if bounding box filter is benefitting from indexed geohashes?
Looking over the code (havent understood it completely, honestly) it doesnt
seem so? Would it make sense to try to emulate bounding box as a boolfilter
of geohash_cell filter? Or would you consider bounding box implementation
as reasonable fast?
What I actually want to do is to get the best results within an area. So my
idea is running a match_all query and a bounding box filter to select
documents within that area (assuming that bounding box is fast) and rescore
with the query that calculates scores and returns the best results. Would
you think this approach makes sense?
Thanks for your help!
Andrej
PS: Will you attend ElasticSearch User Group Meeting in Berlin this month?
May be we could discuss this face to face
the boundingbox filter and the geohash_cell filter are two completely
different filters. Filter by boundingboxes is the more intuitive approach,
since you are able to define your own ranges and positions. The
geohash_cell filter in turn, works on a pre-defined grid with fixed sizes
of boxes.
So filtering boundingboxes is similar to (at least) two range filter. One
for latitude and one for the longitude. The last one can be extended to a
third one if the filter crosses the dateline. Geohash filters work in a
different way: Since all prefixes of the geohash related to a document are
stored this filter is similar to singe term lookup (or a terms look if
neighbors is enabled). This makes the geohash_cell filters very fast with
the limitation to the fixed grid.
I think in your case the boundingbox filter will work fine. Another case I
could think of is a geo_distance filter. This one is not very fast. So the
geohash filter can be used as a pre-filter which roughly selects all
documents within your area and then apply the geo_distance filter to this
reduced resultset. This can be done in a single call. Also this filter
might be interesting for faceting...
I think there are a lot of applications for this and I'll try to join the
usergroup at the end of the month.
Cheers,
Florian
On Thursday, July 11, 2013 10:45:39 AM UTC+2, Andrej Rosenheinrich wrote:
Florian,
may I ask if bounding box filter is benefitting from indexed geohashes?
Looking over the code (havent understood it completely, honestly) it doesnt
seem so? Would it make sense to try to emulate bounding box as a boolfilter
of geohash_cell filter? Or would you consider bounding box implementation
as reasonable fast?
What I actually want to do is to get the best results within an area. So
my idea is running a match_all query and a bounding box filter to select
documents within that area (assuming that bounding box is fast) and rescore
with the query that calculates scores and returns the best results. Would
you think this approach makes sense?
Thanks for your help!
Andrej
PS: Will you attend Elasticsearch User Group Meeting in Berlin this month?
May be we could discuss this face to face
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.