{
    "bool": {
        "must": [
            {
                "bool": {
                    "should": [
                        {
                            "multi_match": {
                                "query": "another search term",
                                "fields": [
                                    "all_near_match^5",
                                    "all_near_match.asciifolding^3.75"
                                ]
                            }
                        },
                        {
                            "function_score": {
                                "query": {
                                    "bool": {
                                        "minimum_should_match": 1,
                                        "should": [
                                            {
                                                "dis_max": {
                                                    "tie_breaker": 1,
                                                    "queries": [
                                                        {
                                                            "bool": {
                                                                "minimum_should_match": 0,
                                                                "filter": [
                                                                    {
                                                                        "multi_match": {
                                                                            "query": "another search term",
                                                                            "fields": [
                                                                                "all",
                                                                                "all.plain"
                                                                            ],
                                                                            "operator": "and"
                                                                        }
                                                                    }
                                                                ],
                                                                "should": [
                                                                    {
                                                                        "match": {
                                                                            "title": {
                                                                                "query": "another search term",
                                                                                "boost": 0.45
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "title.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.15
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "category": {
                                                                                "query": "another search term",
                                                                                "boost": 0.525
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "category.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.175
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "redirect.title": {
                                                                                "query": "another search term",
                                                                                "boost": 0.375
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "redirect.title.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.125
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "heading": {
                                                                                "query": "another search term",
                                                                                "boost": 1
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "heading.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 1
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "auxiliary_text": {
                                                                                "query": "another search term",
                                                                                "boost": 0.225
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "auxiliary_text.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.075
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "text": {
                                                                                "query": "another search term",
                                                                                "boost": 0.3
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "text.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.1
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "file_text": {
                                                                                "query": "another search term",
                                                                                "boost": 0.15
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "file_text.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 0.05
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "suggest": {
                                                                                "query": "another search term",
                                                                                "boost": 1
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "descriptions.ga.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 2.5
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "descriptions.fr.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 2.5
                                                                            }
                                                                        }
                                                                    },
                                                                    {
                                                                        "match": {
                                                                            "descriptions.es.plain": {
                                                                                "query": "another search term",
                                                                                "boost": 2.5
                                                                            }
                                                                        }
                                                                    }
                                                                ]
                                                            }
                                                        }
                                                    ]
                                                }
                                            },
                                            {
                                                "dis_max": {
                                                    "queries": [
                                                        {
                                                            "match": {
                                                                "statement_keywords": {
                                                                    "query": "P999=Q9",
                                                                    "boost": 20
                                                                }
                                                            }
                                                        },
                                                        {
                                                            "match": {
                                                                "statement_keywords": {
                                                                    "query": "P999=Q2",
                                                                    "boost": 10
                                                                }
                                                            }
                                                        }
                                                    ]
                                                }
                                            }
                                        ]
                                    }
                                },
                                "boost_mode": "replace",
                                "functions": [
                                    {
                                        "script_score": {
                                            "script": {
                                                "source": "100 \/ ( 1 + exp( -1 * ( _score + intercept ) ) )",
                                                "params": {
                                                    "intercept": 1
                                                },
                                                "lang": "expression"
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    ],
                    "minimum_should_match": 1
                }
            }
        ],
        "filter": [
            {
                "terms": {
                    "namespace": [
                        0
                    ]
                }
            }
        ]
    }
}