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?
@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: