Skip to main content

No project description provided

Project description

IndexTemplate

  1. This repository contains MetaSearch index template definitions and util methods as shared resources.
  2. 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

  1. Enter your OpenSearch URI, username and password in index_configs.py
  2. Run "python3 setup.py install --user && python3 src/create_templates.py"

To modify index field definitions

  1. 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

  1. Import this repository using Git Submodule
  2. Import the necessary index config from index_configs import twitter_index_config
  3. Use the get fields method get_fields_by_index(discord_index_config).keys()

To obtain the index to be updated or other index metadata

  1. Import "twitter_index_config" or "discord_index_config" and look for the associated attributes
  2. 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

  1. For lightweight re-indexing after template change, follow https://opensearch.org/docs/latest/opensearch/reindex-data/

TODO

  1. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

index_template-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

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

Hashes for index_template-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8be7ac704e379b4903fb23009c882877fa6d71a3c3df16011dd8629d425e5edb
MD5 8e55b74309605a550c838a34770dfe43
BLAKE2b-256 ab4999170845c099b28df4d90e431aacaac8925408b1dcf62c2974b0a126b45f

See more details on using hashes here.

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

Hashes for index_template-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb71dd28a7d2dfde698ff6530da48356b9a6a8cda22aae2bdf613c32b121b924
MD5 8271eb56cc421ef7c2e14767519f7acb
BLAKE2b-256 7314c621699072336cf11ef9e4d806006585e6de226a8d976b2ac77d71d22bbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page