How to use the pandasticsearch.filters.And function in pandasticsearch

To help you get started, we’ve selected a few pandasticsearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __and__(self, x):
        # Combine results
        if isinstance(self, And):
            self.subtree['must'].append(x.subtree)
            return self
        elif isinstance(x, And):
            x.subtree['must'].append(self.subtree)
            return x
        return And(self, x)
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __and__(self, x):
        # Combine results
        if isinstance(self, And):
            self.subtree['must'].append(x.subtree)
            return self
        elif isinstance(x, And):
            x.subtree['must'].append(self.subtree)
            return x
        return And(self, x)
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __and__(self, x):
        # Combine results
        if isinstance(self, And):
            self.subtree['must'].append(x.subtree)
            return self
        elif isinstance(x, And):
            x.subtree['must'].append(self.subtree)
            return x
        return And(self, x)
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __init__(self, *args):
        [isinstance(x, Filter) for x in args]
        super(And, self).__init__()
        self._filter = {'bool': {'must': [x.build() for x in args]}}