No project description provided
Project description
IndexTemplate
- This repository contains MetaSearch index template definitions and util methods as shared resources.
- It also provides an index creation script to manually create index tempalte for Twitter and Discord search (TODO: integrate index template creation as part of OpenSearch CDK deployement)
To create index template
- Enter your OpenSearch URI, username and password in index_configs.py
- Run "python3 setup.py install --user && python3 src/create_templates.py"
To modify index field definitions
- In "field_definitions.py", identify if it's a shared field or any verticial specific field, and modify the corresponding variables
To obtain the list of index fields for a specific index in downstream indexer code
- Import this repository using Git Submodule
- Import the necessary index config
from index_configs import twitter_index_config - Use the get fields method
get_fields_by_index(discord_index_config).keys()
To obtain the index to be updated or other index metadata
- Import "twitter_index_config" or "discord_index_config" and look for the associated attributes
- The index name to be updated to can be found at "twitter_index_config.index_name" and "discord_index_config.index_name"
Notes on re-indexing
- For lightweight re-indexing after template change, follow https://opensearch.org/docs/latest/opensearch/reindex-data/
TODO
- Test the util in indexing lambda using submodules to ensure indexer can be kept in sync with index template, and index based on the template accordingly
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
index_template-0.1.0.tar.gz
(5.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file index_template-0.1.0.tar.gz.
File metadata
- Download URL: index_template-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.14 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8be7ac704e379b4903fb23009c882877fa6d71a3c3df16011dd8629d425e5edb
|
|
| MD5 |
8e55b74309605a550c838a34770dfe43
|
|
| BLAKE2b-256 |
ab4999170845c099b28df4d90e431aacaac8925408b1dcf62c2974b0a126b45f
|
File details
Details for the file index_template-0.1.0-py3-none-any.whl.
File metadata
- Download URL: index_template-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.14 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb71dd28a7d2dfde698ff6530da48356b9a6a8cda22aae2bdf613c32b121b924
|
|
| MD5 |
8271eb56cc421ef7c2e14767519f7acb
|
|
| BLAKE2b-256 |
7314c621699072336cf11ef9e4d806006585e6de226a8d976b2ac77d71d22bbf
|