Hi,
I have a problem with SOLR6 re/indexing.
I know that by default SOLR is re/indexed every 15 seconds and it is fine.
The challange I am facing is that I would like to force/trigger re/indexation process in the code for some created or modified nodes.
Is there a way to re/index node after being created or modified?
If it is possible, are there any threats connected with it?
Thank you in advance for solution or suggestion.
Ideally you don't have to force re-index from code. Indexes are eventually consistent. And if you see issues with index, you should try to re-index via solr admin console.
Default interval for index tracking is 10 seconds (although docs says 15 seconds) and its configurable.
You can partially re-index with help of
/solr/admin/cores?action=SUMMARY&wt=xml , /solr/admin/cores?action=REPORT&wt=xml
/solr/admin/cores?action=REINDEX&txid=3212 or /solr/admin/cores?action=FIX or /solr/admin/cores?action=RETRY
Background from TTL (you should watch it to learn more): https://www.alfresco.com/events/webinars/tech-talk-live-reindexing-large-repositories
@abhinavmishra14 thank you for your response. I don't want to change solr index tracking configuration to make it more frequent (my need would be probably 1 second), because I am afraid that such frequent interval would slow down significantly the system.
The case is that a end-user is creating/modifing a node and if that node is not re/indexed it wouldn't be showed at all or showed with not modified properties. My goal is to show the end-user up-to-date properties. That's why I would like to run re/index process from the code to show the end-user the changes he/she made.
You can add the indexControl aspect for all the nodes that you want to reindex.
This aspect allows you to change the indexing behavior deciding how to manage indexes for that content.
You can decide if indexing only the properties or also the content and finally you could eventually want to disable the indexing process for that node and eventually re-enabled it. Take a look at the documentation:
https://docs.alfresco.com/content-services/latest/config/repository/#control-indexes
Hope this helps.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.