Elastic search reindexing best practice

We have found that we occasionally end up with a situation where we search for new items and they don't come back in the search results. NOTE: Usually new things populate just fine, this only happens intermittently. We are able to fix the issue by running a system reindex from admin. We'd rather not have to do this manually and I see that there is a CLI command to reindex. Is it good practice to just run a system reindex using the CLI occasionally? How often, nightly? According to the documentation[1], this sounds like a not unusual occurrence, does that seem accurate to others?

[1] Performing a system index may resolve search issues for records that have been recently created or modules that were recently enabled for search

Parents
  • We faced a situation in a customer's project. We implemented Visibility Strategy specific bool fields in ES.

    On reindexing it works great, but on editing any record, even if that target bool fields remain intact, the record is not fetched from ES anymore.

    By debugging ES database we realized that, after reindexing the bool fields are set as true or false, but after editing some record those fields are updated to 0 or 1, so ES wlll not fetch them anymore once the value types are not the same.

    We fixed that weird issue by adding both possible values in the Visibility Strategy (true or 1 / false or 0).

    I'm not sure if your issue is related.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • We faced a situation in a customer's project. We implemented Visibility Strategy specific bool fields in ES.

    On reindexing it works great, but on editing any record, even if that target bool fields remain intact, the record is not fetched from ES anymore.

    By debugging ES database we realized that, after reindexing the bool fields are set as true or false, but after editing some record those fields are updated to 0 or 1, so ES wlll not fetch them anymore once the value types are not the same.

    We fixed that weird issue by adding both possible values in the Visibility Strategy (true or 1 / false or 0).

    I'm not sure if your issue is related.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children