Hey Juan, It seems that DataImportHandler is not a right tool for your scenario and you'd better use Solr XML update protocol. * http://wiki.apache.org/solr/UpdateXmlMessages
You still can work around your outdated GUI view problem with calling DIH synchronously, by adding synchronous=true to your request. But it won't solve the problem with two parallel requests from two users to single DIH request handler, because DIH doesn't support that, and if previous request is still running it bounces the second request. HTH, Alex On Fri, Dec 3, 2010 at 10:33 PM, Juan Manuel Alvarez <naici...@gmail.com> wrote: > 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. >