For my application, I'm exploring the idea of penalizing documents based on
their distance from a target point. Currently - using a different data
store - we are using geo as a binary filter, ie, if a document is within a
given radius of a target point, the document is considered, otherwise it is
not.
To do this penalization, I'm using a custom_filters_score query, with this
filter/script combo in the filters array:
{
'filter': {
'match_all':{}
},
"script":"doc['geo'].distanceInKm(param13,
param14)*param15"
}
[param13, param14] define the target point;
param15 defines the strength of the penalty relative to the other penalties
I'm applying.
On a small index I've created for testing, this is super fast, but I'm
concerned about scale.
My question:
Precision is not important to me. If I switched to geohash (and
geohashDistance) and dropped the geohash_precision in the mapping for my
geo field, would I gain anything, performance-wise? In other words, is the
performance of geohashDistance a function of geohash_precision?
--
Let me simplify this question some:
If I just want a set of documents that are roughly within a given radius of
a given point, can I gain anything by using a low-precision geohash? Is
there a tradeoff between geohash precision and performance?
On Monday, November 26, 2012 5:21:37 PM UTC-5, Daniel Weitzenfeld wrote:
For my application, I'm exploring the idea of penalizing documents based
on their distance from a target point. Currently - using a different data
store - we are using geo as a binary filter, ie, if a document is within a
given radius of a target point, the document is considered, otherwise it is
not.
To do this penalization, I'm using a custom_filters_score query, with this
filter/script combo in the filters array:
{
'filter': {
'match_all':{}
},
"script":"doc['geo'].distanceInKm(param13,
param14)*param15"
}
[param13, param14] define the target point;
param15 defines the strength of the penalty relative to the other
penalties I'm applying.
On a small index I've created for testing, this is super fast, but I'm
concerned about scale.
My question:
Precision is not important to me. If I switched to geohash (and
geohashDistance) and dropped the geohash_precision in the mapping for my
geo field, would I gain anything, performance-wise? In other words, is the
performance of geohashDistance a function of geohash_precision?
--