TABLE OF CONTENTS
- Publishing Data
- Rebuilding Derived Data
- Step 1: Clearing Entire Published Data
- Step 2: Re-publish Store
Znode persists product data to Elasticsearch and SQL Server databases. The SQL Server database is the system of record for everything, with the Elasticsearch being derived from the SQL data.
It can be helpful for developers to know more details about this flow of data, especially if working on customizations to backend behavior.
The following diagram shows how the system of record, data in SQL, derives the product data indexed in Elasticsearch.
Triggering data flow from SQL to the downstream databases is known as 'Publishing' in Znode. Publishing a store can be invoked at any time from the Admin UI on the Stores & Reps > Stores page by clicking the globe icon for the desired store.
Rebuilding Derived Data
When investigating issues, it can be helpful to delete and rebuild data stored in Elasticsearch. To do so, follow these steps:
Step 1: Clearing Entire Published Data
Administrators can delete the entire Elasticsearch index and all published data from SQL from this section.
Important - This mechanism is only intended to be triggered in unusual circumstances that can arise during the development of a Znode implementation. This should not be triggered in a production environment in normal circumstances. Please fully understand the consequences of triggering this mechanism before doing so.
Step 2: Re-publish Store
The final step is to re-publish the entire store.
- In the Admin UI, go to Stores & Reps > Stores.
- Click the globe icon for the store to publish.
- Progress bars will show the progress of the publishing operation.
Optionally, the Elasticsearch index can be manually deleted and rebuilt:
- Send an HTTP DELETE request to Elasticsearch. For example: DELETE http://localhost:9200/maxwellindex
- See the dedicated Elasticsearch documentation page for more information about deleting indices.
- Step 2: Re-create Elasticsearch Index
- The next step is to re-create the Elasticsearch index.
- Go to the Marketing > Site Search page of the Admin UI.
- Select the desired catalog in the Catalog field.
- Click Create Index to create the new empty index.