Open rikukissa opened 9 months ago
create_elastic_index function exists in the infrastructure/elasticsearch/setup_helpers.sh file if that helps.
That does help a bit but unless we define the schema and field types ourselves, Elasticsearch infers it for us. For most cases it does work but will hinder search performance. For instance an ID might be inferred to be a searchable text similar to names. This again might affect how search queries are executed so we're introducing unwanted unpredictability
We must handle this in core to sync up the search parameters and the mapping. Likely a good place is when reindexing
Make sure ElasticSearch is fully initialised before the application starts. The reason for this is:
Tech tasks:
unmapped_type
here when the mapping is available