Contents
Elasticsearch integration for guillotina.
config.json can include elasticsearch section:
"elasticsearch": { "index_name_prefix": "guillotina-", "connection_settings": { "hosts": ["localhost:9200"], "sniffer_timeout": 0.5, "sniff_on_start": true } }
POST SITE_URL/@catalog
{}
DELETE SITE_URL/@catalog
{}
guillotina_elasticsearch comes with a es-migrate guillotina command:
./bin/g es-migrate
This command will perform a live migration on the index. It does this by performing the reindex on a new index while the other one is still active.
New index and delete requests are performed on both indexes during live migration.
It is also smart about how to migrate, doing a diff on the mapping and only reindexing the fields that changed.
- ES 6 does not have doc types support
- aioes deprecated
- IElasticSearchUtility changes:
- query: doc_type param no longer used
- IElasticSearchUtility.conn changes:
- put_mapping
- put_settings
- put_alias
- get: needs doc_type=DOC_TYPE
- bulk: needs doc_type=DOC_TYPE
- conn.transport.get_connection(): ._session -> .session, ._base_url -> .base_url
- conn.transport.get_connection().[method] -> need to include content-type: application/json
If container es (elasticsearch) fails to start when running tests, you should increase max_map_count. command:
# Linux sudo sysctl -w vm.max_map_count=262144