// This file is autogenerated, DO NOT EDIT
// search/search-your-data/filter-search-results.asciidoc:195

[source, python]
----
resp = client.search(
    query={
        "match": {
            "message": {
                "operator": "or",
                "query": "the quick brown"
            }
        }
    },
    rescore={
        "window_size": 50,
        "query": {
            "rescore_query": {
                "match_phrase": {
                    "message": {
                        "query": "the quick brown",
                        "slop": 2
                    }
                }
            },
            "query_weight": 0.7,
            "rescore_query_weight": 1.2
        }
    },
)
print(resp)
----
