def test_exclude(): ubq = UpdateByQuery() ubq = ubq.exclude("match", title="python") assert { "query": { "bool": { "filter": [{"bool": {"must_not": [{"match": {"title": "python"}}]}}] } } } == ubq.to_dict()
def test_exclude(): ubq = UpdateByQuery() ubq = ubq.exclude('match', title='python') assert { 'query': { 'bool': { 'filter': [{ 'bool': { 'must_not': [{ 'match': { 'title': 'python' } }] } }] } } } == ubq.to_dict()
def test_exclude(): ubq = UpdateByQuery() ubq = ubq.exclude('match', title='python') assert { 'query': { 'bool': { 'filter': [{ 'bool': { 'must_not': [{ 'match': { 'title': 'python' } }] } }] } } } == ubq.to_dict()