def get_entities_filter(search_entities):
	"""Forms filter dictionary for search_entities
	
	Args:
	    search_entities (string): entities in search text
	
	Returns:
	    dict: ES filter query
	"""
	return {
		"nested": {
			"path": "data.entities",
				"filter":{
					"bool":{
						"should": [
						{
							"terms": {
								"data.entities.screen_name": search_entities
							}
						},
						{
							"terms": {
								"data.entities.name": search_entities
							}
						}
					]
				}
			}
	    }
	}