Page MenuHomePhabricator
Paste P28508

Geosearch relevance query tests
ActivePublic

Authored by WMDE-Fisch on May 25 2022, 10:34 AM.
Tags
None
Referenced Files
F35175622: Geosearch relevance query tests
May 25 2022, 10:34 AM
Subscribers
None
curl -X GET -H 'Content-Type: application/json' https://cloudelastic.wikimedia.org:8243/enwiki_content/_search -d '{
"_source": [
"coordinates.coord",
"coordinates.primary",
"coordinates.globe"
],
"post_filter": {
"bool": {
"filter": [
{
"nested": {
"path": "coordinates",
"query": {
"bool": {
"filter": [
{
"bool": {
"filter": [
{
"term": {
"coordinates.globe": "earth"
}
},
{
"term": {
"coordinates.primary": true
}
}
]
}
},
{
"geo_distance": {
"distance": "100000m",
"coordinates.coord": {
"lat": 48.856613,
"lon": 2.352222
}
}
}
]
}
}
}
},
{
"terms": {
"namespace": [
0
]
}
}
]
}
},
"rescore": [
{
"window_size": 8192,
"query": {
"query_weight": 1,
"rescore_query_weight": 1,
"score_mode": "multiply",
"rescore_query": {
"function_score": {
"functions": [
{
"field_value_factor": {
"field": "incoming_links",
"modifier": "log2p",
"missing": 0
}
}
]
}
}
}
}
],
"size": 50,
"query": {
"match_all": {}
}
}'