mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.0 KiB
54 lines
1.0 KiB
8 years ago
|
{
|
||
|
"query": {
|
||
|
"function_score": {
|
||
|
"query": {
|
||
|
"filtered": {
|
||
|
"query": {
|
||
|
"bool": {
|
||
|
"should": []
|
||
|
}
|
||
|
},
|
||
|
"filter": {
|
||
|
"bool": {
|
||
|
"must": [
|
||
|
{
|
||
|
"terms": {
|
||
|
"layer": [
|
||
|
"test"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"max_boost": 20,
|
||
|
"functions": [
|
||
|
{
|
||
|
"field_value_factor": {
|
||
|
"modifier": "log1p",
|
||
|
"field": "popularity",
|
||
|
"missing": 1
|
||
|
},
|
||
|
"weight": 1
|
||
|
},
|
||
|
{
|
||
|
"field_value_factor": {
|
||
|
"modifier": "log1p",
|
||
|
"field": "population",
|
||
|
"missing": 1
|
||
|
},
|
||
|
"weight": 2
|
||
|
}
|
||
|
],
|
||
|
"score_mode": "avg",
|
||
|
"boost_mode": "multiply"
|
||
|
}
|
||
|
},
|
||
|
"sort": [
|
||
|
"_score"
|
||
|
],
|
||
|
"size": 10,
|
||
|
"track_scores": true
|
||
|
}
|