We are using spell:suggest and the spell:suggest-detailed api’s for fetching the correct words from a custom spell dictionary. Now if we update the spell dictionary and then fire the query, it takes a long time to return the results for the first hit. Again if we fire the same query the time taken to return back the results is considerably reduced.
Is it related to re-indexing of the spell dictionary every time it is updated or has some other reasons behind it. Can you please suggest some ways which will help to improve the performance of the first hit.
Thanks a lot for your help in advance !!
A simple solution would be to spawn a task that calls the
spell:suggestfunctions in order to get the caches rebuilt, before an end user tries using them. You can do this directly after each update.On the other hand, if updates are likely to occur not very often, then why bother? Not sure why you need to update the custom dictionary regularly, but I’d expect not many changes after perhaps a short burst in the beginning.