Elasticsearch

This package contains the tools for providing compatibility between Whoosh and Elasticsearch.

class whooshes.elasticsearch.ESQueryTransformer(schema: whoosh.fields.Schema)

Query transformer implementation for Elasticsearch.

transform(query: whoosh.query.qcore.Query) Dict[str, Any]

Transform a given query object as necessary for the target backend.

get_method(tquery: Type[whoosh.query.qcore.Query]) Callable[[whoosh.query.qcore.Query], whooshes.transformer.T]

Get the particular method which should handle transforming the given query type. This method has a per-instance LRU cache applied during initialization to minimize overhead.