Hello everyone! I would like to ask you a question about DIH.

I am using a database and DIH to sync against Solr, and a GUI to
display and operate on the items retrieved from Solr.
When I change the state of an item through the GUI, the following happens:
a. The item is updated in the DB.
b. A delta-import command is fired to sync the DB with Solr.
c. The GUI is refreshed by making a query to Solr.

My problem comes between (b) and (c). The delta-import operation is
executed in a new thread, so my call returns immediately, refreshing
the GUI before the Solr index is updated causing the item state in the
GUI to be outdated.

I had two ideas so far:
1. Querying the status of the DIH after the delta-import operation and
do not return until it is "idle". The problem I see with this is that
if other users execute delta-imports, the status will be "busy" until
all operations are finished.
2. Use Zoie. The first problem is that configuring it is not as
straightforward as it seems, so I don't want to spend more time trying
it until I am sure that this will solve my issue. On the other hand, I
think that I may suffer the same problem since the delta-import is
still firing in another thread, so I can't be sure it will be called
fast enough.

Am I pointing on the right direction or is there another way to
achieve my goal?

Thanks in advance!
Juan M.

Reply via email to