Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Jul 4, 2024
1 parent 4beee15 commit a1a94f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ You can read results from a specified index by using an `ElasticsearchDatasource

```python
from ray import init
from ray.data import read_datasink
from ray.data import read_datasource
from ray_elasticsearch import ElasticsearchDatasource

init()
source = ElasticsearchDslDatasource(index="test")
source = ElasticsearchDatasource(index="test")
res = read_datasource(source)\
.map(lambda x: x["_source"])\
.sum("id")
Expand All @@ -47,7 +47,7 @@ print(f"Read complete. Sum: {res}")
Use an Elasticsearch [query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) to filter the results:

```python
source = ElasticsearchDslDatasource(
source = ElasticsearchDatasource(
index="test",
query={
"match": {
Expand Down

0 comments on commit a1a94f0

Please sign in to comment.