Skip to content

Instantly share code, notes, and snippets.

@holdenk
Created April 11, 2012 19:53
Show Gist options
  • Save holdenk/2361952 to your computer and use it in GitHub Desktop.
Save holdenk/2361952 to your computer and use it in GitHub Desktop.
evenue query
"custom_score" : {
"query" : {
"bool" : {
"should" : [ {
"query_string" : {
"query" : "\"808F7E2050000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2061000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E20C0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2140000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2190000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E21B0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2230000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E23C0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2440000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2490000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E24F5000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E25B0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E25D0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E265C000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2670000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E26C0000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2702B00000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E271C000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E2730000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
}, {
"query_string" : {
"query" : "\"808F7E274B000000\"",
"fields" : [ "geoS2CellIds^1.0" ]
}
} ]
}
},
"script" : "_score * (1 +5000.0*pow(((1.0*(pow(doc['point'].distanceInKm(37.768349,-122.418654),2.0)))+1.0),-1.0) + (doc['decayedPopularity1'].value *0.05) )"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment