Reindexing the Search Index

Blank 2/3/2022 14:10 - 2/3/2022 14:10
Incentives eCommerce Developers User Management Integrations Feedback & Recognition Blogs & Forums Fundamentals Website Management Solutions Security

Reindexing the Search Index

Very rarely you may come across a scenario where a whole bunch of data has seemingly disappeared. This could be your users, groups or even organisations not displaying properly or at all. The most likely cause of the problem is that the Index has been corrupted or modified.

The first step is to head on over to your search index page, and just have a quick look over its structure. The Search Index page can be found under the Data tab from your admin dashboard

 undefined

Next we'll explain what a search index is. Please take a look at the screenshot below:

The screenshot above depicts an index that is working correctly.

By default, barring any additional search indexes made by other appplications, a fresh Kademi account will give you the Search Indexes for

"Product Orders" "Forum Comments" "Data Series" "Organisation" "Logs" "Profile" "Recognition Topics" "eCommerce Store" "Reward Points Debit" "Leads" "Products" "Assets" "Task" "Stage" "Signup Log" "Reward Points" "Users Visit" "Reward Entries" and "Recognition Period Results"

Kademi stores data in a very robust, transactional database but it can be slow for some things such as searching and reporting. So we copy the data over to a much faster but less robust database called Elasticsearch. These are the search indexes and is the reason why we use them

All of these will contain data pertaining to different parts of Kademi, and very rarely they may get corrupted due to some unforseen circumstance

If you notice a problem similar to what has been described earlier in this documentation then the next step is to re-index

 

To Re-index an index please see the screenshot and steps below:

1. First, locate the index that is corrupted. For example, if you are having problems with profiles/users you may want to reindex the profile index

2. Click on the checkbox for the index. Make sure that the only index you want to re-index is selected or the process may end up taking an unnecessarily long amount of time

3. Click "Re-index selected indexes" and wait

This will create a background job which will delete everything in the index and reimport it all.

PLEASE BE AWARE: A large Index will take a longer amount of time to reindex and you should only reindex something if absolutely necessary. There is no point in reindexing an index that is working correctly. As an example, a search index of around 5000 users would take around 5 minutes to complete with a larger index taking even more time. 

The Logs index can be one such example of an extremely large index and should generally NOT be re-indexed. 

 

After it is done, please go back to where you saw the problem occurring and verify that it is working correctly now. If it is all working correctly then you won't need to take any further steps.

If you are still having a problem then the issue will need to be investigated by the team. For that you will need to create a Support Request.