Page MenuHomePhabricator
Paste P6991

(An Untitled Masterwork)
ActivePublic

Authored by Smalyshev on Apr 14 2018, 12:32 AM.
Tags
None
Referenced Files
F16964561:
Apr 14 2018, 12:36 AM
F16964545:
Apr 14 2018, 12:32 AM
Subscribers
None
{
"description": "wikibase_prefix search for 'duck'",
"path": "wikidatawiki\/page\/_search",
"params": {
"timeout": "20s"
},
"query": {
"query": {
"bool": {
"should": [
{
"bool": {
"filter": [
{
"match": {
"lexeme_forms.representation.prefix": "duck"
}
}
],
"should": [
{
"dis_max": {
"tie_breaker": 0,
"queries": [
{
"constant_score": {
"filter": {
"match": {
"lexeme_forms.representation.near_match": "duck"
}
},
"boost": 2
}
},
{
"constant_score": {
"filter": {
"match": {
"lexeme_forms.representation.near_match_folded": "duck"
}
},
"boost": 1.5
}
},
{
"constant_score": {
"filter": {
"match": {
"lexeme_forms.representation.prefix": "duck"
}
},
"boost": 1
}
}
]
}
}
]
}
},
{
"term": {
"lexeme_forms.id": "DUCK"
}
}
],
"minimum_should_match": 1,
"filter": [
{
"term": {
"content_model": "wikibase-lexeme"
}
}
]
}
},
"_source": [
"namespace",
"title",
"lemma",
"lexeme_language",
"lexical_category",
"lexeme_forms"
],
"stored_fields": [],
"highlight": {
"pre_tags": [
""
],
"post_tags": [
""
],
"fields": {
"lexeme_forms.id": {
"type": "experimental",
"fragmenter": "none",
"number_of_fragments": 0
},
"lexeme_forms.representation": {
"type": "experimental",
"fragmenter": "none",
"number_of_fragments": 0,
"matched_fields": [
"lexeme_forms.representation.prefix"
],
"options": {
"skip_if_last_matched": true
}
}
}
},
"size": 8,
"rescore": [
{
"window_size": 8192,
"query": {
"query_weight": 1,
"rescore_query_weight": 1,
"score_mode": "total",
"rescore_query": {
"function_score": {
"score_mode": "sum",
"functions": [
{
"script_score": {
"script": {
"inline": "pow(doc['incoming_links'].value , 1) \/ ( pow(doc['incoming_links'].value, 1) + pow(100,1))",
"lang": "expression"
}
},
"weight": 0.4
},
{
"script_score": {
"script": {
"inline": "pow(doc['statement_count'].value , 2) \/ ( pow(doc['statement_count'].value, 2) + pow(20,2))",
"lang": "expression"
}
},
"weight": 0.6
}
]
}
}
}
}
],
"stats": [
"wikibase-prefix"
]
},
"options": {
"timeout": "20s"
}