Entity is configured link and defined in php link and next thing is to get these settings to ElasticSearch.
- When to use?
- You dont have any index, your ElasticSearch installation is clean and with no index for our entities.
- How?
- Entity is configured from previous step and we just need to run command.
php www/index spameri:elastic:initialize-index
- Can be used for specific entity
php www/index spameri:elastic:initialize-index video
- When to use?
- You have existing index with outdated data with old configuration, but you dont need to keep them. This is usually when you are generating ElasticSearch data from another database.
- How?
- Just add -f option. First thing command does is delete old index, then creating new empty index with new settings.
php www/index spameri:elastic:initialize-index -f
- Can be used for specific entity
php www/index spameri:elastic:initialize-index -f video
- When to use?
- You dont have source for data saved in ElasticSearch.
- Best is backup your data with command. This creates bulk json document with all data from index.
php www/index spameri:elastic:dump-index
- With data backed up, now you can delete index and create it fresh with new mapping - following variant 2.
- Last thing is get your old data to new index wit this command.
php www/index spameri:elastic:restore-index