When to update an index using Lucene.NET? Asink or not?

Is it usually fast enough to make simple updates synchronously? For example, using an ASP.NET web application, if I change the name of a person ... will I have any problems just updating the index synchronously as part of the "Save" mechanism?

OR is the only safe way to have any other asynchronous process to update the index?

+3
source share
2 answers

We perform the update both synchronously and asynchronously, depending on the type of action that the user performs. We have implemented synchronous indexing so that we use asynchronous code and just wait for some time to complete it. We expect only 2 seconds, which means that if it takes longer, the user will not see the update, but usually the user will.

We set up logging so that we get a notification when β€œsynchronous” indexing took longer than we expected to understand how often this would happen. We almost never overcome the 2 second limit.

+2
source

, . .

0

Source: https://habr.com/ru/post/1708383/


All Articles