elasticmock
elasticmock copied to clipboard
Python Elasticsearch Mock for test purposes
Currently the [create](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.create) endpoint is not supported by the fake class.
Hi, sweet tool you created. Are there any plans to support elasticsearch 8?
I'm trying to use elasticsearch.helpers.scan with the mocked ES. It apparently doesn't work because the results don't include a `_scroll_id`: https://github.com/elastic/elasticsearch-py/blob/9fe0763670633848b521ff9df6350bc811f4f110/elasticsearch/helpers/__init__.py#L367. Is it insane to think about adding this functionality,...
I am attempting to bulk create a few documents by passing this to `bulk`: ```json {"create": {"customer_id": 1, "field2": "doc1", "_index": "my_index"}} {"create": {"customer_id": 1, "field2": "doc2", "_index": "my_index"}} ```...
Judging from an other issue, it's not maintained but I hope you still accept PRs. I will submit one ASAP.
import elasticsearch class FooService: def __init__(self): self.es = elasticsearch.Elasticsearch(hosts=[{'host': 'localhost', 'port': 9200}]) def create(self, index, body): es_object = self.es.index(index, body) return es_object.get('_id') def read(self, index, id): es_object = self.es.get(index, id)...
Hello all, When I was introducing elasticmock for unit testing, I found out that it doesn't support the "must", "should" and "must_not" features of Elasticsearch_dsl. Has anyone experienced this issue...
Hi, Many query params don't work because they are not mentioned in the implemented code. kindly try to think of including these parameters, especially in the "search" method !
When searching and keeping only selected attributes (using `_source` inside `body`) the fake search method ignores this and returns all attributes. This test fails but when run agains ES server...