ASRT module, as expected by his name and description always commits changes to Solr immediately (attempting softCommit first):
http://cgit.drupalcode.org/apachesolr_realtime/tree/apachesolr_realtime....
Though it is the expected behaviour, this module does his task by doing two different steps:
1. Uploading inserts/deletes to Solr immediately
2. Performing the mentioned commit afterwards to make it visible immediately
However, there might be use cases where 'just uploading' without commiting would be enough.
For example, to avoid a worst-case scenario, such as not having softCommit available. This would force a hardcommit, which is a performance killer. There are some setups in which the site admin might prefer to tune the Solr commit behaviour at the server side.
Another case is, although waiting to upload on cron is bad, some other commit configuration is 'realtime enough' for the site admin. Solr offers some nice settings to commit after N updates or T seconds and the site admin could take advantage of them if this option is available.
An easy solution would be to offer two behaviours for the commit step:
- A 'try to commit ASAP' behaviour as it's done now, which would be the default.
- An 'honour AS module commit settings' to allow the commit step to be configurable by the site admin.
If no caveats nor feedback against this feature are raised, I would like to know if such a patch would be accepted.
Comments
Comment #1
manarth CreditAttribution: manarth as a volunteer commentedApologies for the excessive time it's taken to respond to your question…
Yes, we'd welcome a patch that provided this feature.
I would like the behaviour to be configurable (with the default being the current immediate-commit behaviour), but we don't have a configuration page for the module at the moment. That's something we need to think about, especially in the light of other configuration feature-requests such as #2704753: Choose which bundles to be indexed real-time..