Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P9524
(An Untitled Masterwork)
Active
Public
Actions
Authored by
EBernhardson
on Nov 4 2019, 7:30 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F30989745: raw.txt
Nov 4 2019, 7:30 PM
2019-11-04 19:30:02 (UTC+0)
Subscribers
None
{
"_source": [ "title" ],
"explain": true,
"size": 1,
"query": {
"bool": {
"filter": [
{
"bool": {
"should": [
{
"match": {
"all": {
"query": "example",
"operator": "AND"
}
}
},
{
"match": {
"all.plain": {
"query": "example",
"operator": "AND"
}
}
}
]
}
},
{
"terms": {
"namespace": [
0
]
}
}
]
}
},
"rescore": [
{
"window_size": 1024,
"query": {
"query_weight": 1,
"rescore_query_weight": 1,
"score_mode": "total",
"rescore_query": {
"function_score": {
"score_mode": "sum",
"boost_mode": "sum",
"query": {
"sltr": {
"model": "20170911_enwiki_v1",
"params": {
"query_string": "example"
}
}
},
"functions": [
{
"script_score": {
"script": {
"lang": "painless",
"source": """
double popularity = doc['popularity_score'].empty ? 0 : doc['popularity_score'].value;
double norm_ltr = (_score - params.mean) / params.std;
return popularity * params.w1 + norm_ltr * params.w2;
""",
"params": {
"mean": 1.2,
"std": 0.42,
"w1": 0.8,
"w2": 0.2
}
}
}
}
]
}
}
}
}
]
}
Event Timeline
EBernhardson
created this paste.
Nov 4 2019, 7:30 PM
2019-11-04 19:30:02 (UTC+0)
Log In to Comment