-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do we need to specify the 'sort' param? #115
Comments
Also worth checking what track_scores does and if we still need that? |
This is still used by reverse: |
I just confirmed that all scores are zero or null for reverse queries. So I do believe that we can remove the Also, it look like the purpose of |
I had a look at the reverse queries this week for an unrelated reason and after some playing around with the queries, figured out a way of moving the geo distance scoring out of the I'm really not sure if that's the right thing to do or what the performance impact would be so I'll post an example here and we can look at it again later. I guess one benefit would be that the queries would be more similar to what we see for autocomplete and search when it comes to sorting. {
"query": {
"bool": {
"should": [
{
"function_score": {
"functions": [
{
"linear": {
"center_point": {
"origin": {
"lat": 1.317701,
"lon": 103.849463
},
"scale": "1km",
"offset": "0",
"decay": 0.5
}
}
}
]
}
}
],
"filter": [
{
"geo_distance": {
"distance": "1km",
"distance_type": "plane",
"center_point": {
"lat": 1.317701,
"lon": 103.849463
}
}
}
]
}
},
"size": 20,
"sort": [
"_score"
]
}
|
All our queries have the following clause at the end which I believe is redundant?
It would be worth investigating further to confirm if
_score
is the default mode and if so we can remove this.The text was updated successfully, but these errors were encountered: