Reindexing

Whenever there is a change in the name or type of an existing field, or a new field has been added that requires explicit mappings, a full re-index of all flex-account indices is required.

Performing a Complete Reindex

  1. Delete all indices. curl -XDELETE hostname:9200/flex-account*

  2. Reindex the data: curl -X POST -H "Content-Type: application/json" -d '{}' "http://indexElasticHost:18116/api/reindex"

  3. Check pending items count in RabbitMQ:

  • If you have JQ installed, use the following: curl -s -u guest:guest host:15672/api/queues/%2F/flex.indexelastic.indexdeduped.queue | jq .messages

  • If you don’t have JQ installed, use the following: curl -s -u guest:guest host:15672/api/queues/%2F/flex.indexelastic.indexdeduped.queue

  1. Locate the messages key.

Performing a Partial Reindex

  1. Delete a single index: curl -XDELETE hostname:9200/<indexName>

  2. Reindex the data: curl -X POST -H "Content-Type: application/json" -d '{"accountId":<accountIdOfIndex>}' http://indexElasticHost:18116/api/reindex

  3. Check pending items count in RabbitMQ:

  • If you have JQ installed, use the following: curl -s -u guest:guest host:15672/api/queues/%2F/flex.indexelastic.indexdeduped.queue | jq .messages

  • If you don’t have JQ installed, use the following: curl -s -u guest:guest host:15672/api/queues/%2F/flex.indexelastic.indexdeduped.queue

  1. Locate the messages key.