How to use the pandasticsearch.filters.Or 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 __or__(self, x):
        # Combine results
        if isinstance(self, Or):
            self.subtree['should'].append(x.subtree)
            return self
        elif isinstance(x, Or):
            x.subtree['should'].append(self.subtree)
            return x
        return Or(self, x)
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __init__(self, *args):
        [isinstance(x, Filter) for x in args]
        super(Or, self).__init__()
        self._filter = {'bool': {'should': [x.build() for x in args]}}
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __or__(self, x):
        # Combine results
        if isinstance(self, Or):
            self.subtree['should'].append(x.subtree)
            return self
        elif isinstance(x, Or):
            x.subtree['should'].append(self.subtree)
            return x
        return Or(self, x)
github onesuper / pandasticsearch / pandasticsearch / filters.py View on Github external
def __or__(self, x):
        # Combine results
        if isinstance(self, Or):
            self.subtree['should'].append(x.subtree)
            return self
        elif isinstance(x, Or):
            x.subtree['should'].append(self.subtree)
            return x
        return Or(self, x)