{ "_source": [ "namespace", "title", "namespace_text", "wiki", "redirect.*", "timestamp", "text_bytes" ], "stored_fields": [ "text.word_count" ], "query": { "bool": { "must": [ { "dis_max": { "queries": [ { "term": { "weighted_tags": { "value": "classification.ores.articletopic/Culture.Media.Video games", "boost": 1 } } } ] } } ], "filter": [ { "bool": { "must": [ { "match": { "weighted_tags": { "query": "recommendation.link/exists" } } }, { "terms": { "namespace": [ 0 ] } } ] } } ] } }, "stats": [ "full_text", "complex_query", "articletopic", "hasrecommendation", "filter_only" ], "rescore": [ { "window_size": 8192, "query": { "query_weight": "1.0", "rescore_query_weight": "1.0", "score_mode": "multiply", "rescore_query": { "function_score": { "functions": [ { "script_score": { "script": { "source": "doc['text_bytes'].value >= params['minimumLength'] ? doc['text_bytes'].value / Math.max(params._source.outgoing_link.size(),1) : 1", "params": { "minimumLength": 300 }, "lang": "painless" } } } ] } } } } ], "size": 100 }