Created
April 8, 2019 09:21
-
-
Save 0xc0d/69572323884ec0b11261ec61e439c043 to your computer and use it in GitHub Desktop.
implementation of Elasticsearch should query in Python 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def should(sample, conditions, min_should): | |
return True if len([item for item in conditions if item in sample]) >= min_should else False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment