Templates
create_templates(client)
¶
Creates the data templates required for both latest and archive indices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Elasticsearch
|
an Elasticsearch client object |
required |
Source code in splitgill/indexing/templates.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
get_arc_template()
¶
Returns the template to use for the archive (arc) indices. This template is the same as the base template but with a single shard per index as we limit the size of the index by record count, and therefore it's enough to just use a single shard.
Returns:
| Type | Description |
|---|---|
dict
|
the template as a dict |
Source code in splitgill/indexing/templates.py
40 41 42 43 44 45 46 47 48 49 50 51 52 | |
get_latest_template()
¶
Returns the template to use for the archive (arc) indices. This template is the same as the base template but with 5 shards per index to help search throughput and because the latest index could be large if the database has a large number of records.
Returns:
| Type | Description |
|---|---|
dict
|
the template as a dict |
Source code in splitgill/indexing/templates.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |