If your App item count drops unexpectedly or shows little to no data, search results on your site can look like they're down even when the Search API is still responding.
For Drupal sites, this usually means a connected Drupal environment triggered a delete or reset operation for the Drupal search index or the SearchStax App data connected to that index.
Common Causes
This issue can happen when a Drupal environment runs an action that clears or deletes indexed data. Common causes include:
- Uninstalling Drupal search-related modules.
- Running deletion scripts that clear the Drupal search index.
- Running custom cron jobs that delete indexed content.
- Connecting a non-production Drupal environment to a production SearchStax App.
Why Another Drupal Environment Can Affect Production
SearchStax doesn't automatically clear App data. A connected source, such as Drupal or the SearchStax Web Crawler, must trigger a delete or reset operation.
If multiple Drupal environments share the same SearchStax App connection details, actions in one environment can affect the App used by another environment. For example, if a Development Drupal site is connected to your Production App, deleting the Development search index can also clear Production search data.
Check Your Drupal Connections
Review each Drupal environment that can connect to SearchStax:
- Development
- QA
- Staging
- Production
Make sure each environment uses the correct SearchStax App endpoint and token. Avoid connecting multiple Drupal environments to the same SearchStax App unless that is an intentional part of your workflow.
Prevent Environment Configuration Mix-Ups
Use an environment-specific configuration approach so each Drupal environment connects only to the intended SearchStax App.
- Recommended: Use the Drupal Key Module with SearchStax to store SearchStax credentials outside the Drupal database.
- Alternative: If the Drupal Key module isn't an option, override the SearchStax connection settings through settings.php.
Do not use both methods together for the same SearchStax connection. Using both can create configuration conflicts and make it harder to determine which credentials Drupal is using.
What to Do If App Data Is Missing
To identify the source of the deletion and restore data from the correct environment, follow these steps:
- Confirm whether the App item count dropped or cleared in SearchStax.
- Check recent Drupal module changes, uninstallations, cron jobs, and search index operations.
- Confirm that non-production Drupal environments are not connected to the production SearchStax App.
- Correct the Drupal connection settings if an environment is using the wrong App endpoint or token.
- Rebuild or reindex content from the correct Drupal environment.