Skip to content

Commit 0a7425f

Browse files
committed
README.md: document indices naming convention
1 parent c348f70 commit 0a7425f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pip install elasticsearch-query
1414

1515
```python
1616
from elasticsearch_query import ElasticsearchQuery
17-
es_query = ElasticsearchQuery(es_host='es.prod', since=12345, period=900)
17+
es_query = ElasticsearchQuery(es_host='es.prod', since=12345, period=900, index_prefix='logstash-my-app')
1818
```
1919

2020
`es_host` needs to be specified with a host of Elasticsearch instance to connect.
@@ -24,6 +24,9 @@ Provide either `since` (absolute timestamp) or `period` (last N seconds):
2424
* `since`: UNIX timestamp data should be fetched since (if None, then period specifies the last n seconds).
2525
* `period`: period (in seconds) before now() to be used when since is empty (defaults to last 15 minutes).
2626

27+
`index_prefix` argument will be used to build indices names to query in.
28+
They should follow the `index-name-YYYY.MM.DD` naming convention, e.g. `logstash-my-app-2014.08.19`.
29+
2730
### `get_rows`
2831

2932
> Returns data matching the given query (provided as a `dict`).

0 commit comments

Comments
 (0)