WebDevStudios / wp-search-with-algolia

Improve search on your site. Autocomplete is included, along with full control over look, feel and relevance.

Home Page:https://wordpress.org/plugins/wp-search-with-algolia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checkbox to stop auto-indexing on Development / Staging servers

asha23 opened this issue · comments

Is your feature request related to a problem? Please describe.

Dev and staging servers with the plugin enabled seem to index these sites

Describe the solution you'd like

The ability to turn off auto-indexing on these sites if needed - They were contaminating my search results with content from these dev/staging servers.

Good day @asha23

We would recommend checking out https://github.com/WebDevStudios/wp-search-with-algolia/wiki/Constants where we have some defined constants options available. Most specifically these:

ALGOLIA_APPLICATION_ID
ALGOLIA_SEARCH_API_KEY
ALGOLIA_API_KEY
ALGOLIA_INDEX_NAME_PREFIX

You can use the constants to define the same values used on the settings page, via say your wp-config.php file, and each install would get their own values, from outside of the database.

At minimum, in case of having just one application in Algolia, We'd recommend setting the ALGOLIA_INDEX_NAME_PREFIX to say dev_ or staging_ instead of the default wp_. This would give each environment their own indexes and would prevent cross "pollution" of the content.

Alternatively, you could give each environment their own Application ID/Key sets and thus still prevent cross pollution, while still facilitating potential database content migrations.

Let us know if you have any questions about this, we'll answer as best we can.

Fab. I'll give this a try. Many thanks.

Closing as a non-issue at the moment.