In my Spring MVC application I have Solr set up as an embedded server and
have two singleton beans which I use to refer to the live server and the
rebuild server. That all seems to work fine. I have a Java rebuild method
which I use to load up the rebuild core with data. At the end of this
method I am attempting to switch the cores around so that the main
application can still keep using the live core and automatically pick up the
new data. Unfortunately, it doesn't appear to be swapping, or rather it
does sometimes but I can't see why.
My swapping code is:
// Swap the cores
CoreAdminRequest car = new CoreAdminRequest();
The solrServer variable would be pointing to my rebuild core that I have
just updated. I see that index files in core1 get updated. And I've also
see that the index files in core0 have been updated at some time earlier in
the day due to timestamps.
I haven't been able to see a working example of swapping cores via Java so I
wondered whether I was doing it wrong or missing out an important step, or
perhaps I've got completely the wrong end of the stick and looking at the
timestamps on my files is not correct. Regardless of this what I can see in
my application though is that searches that constantly look to the live core
return the same data so the swapping doesn't seem to take place.
> Hi Shaun,
> I think it is more easy to fix this problem, if we got more information
> about what is going on in your application.
> Please, could you provide the CoreAdminResponse returned by car.process()
> for us?
> Kind regards,
> - Mitch
> View this message in context:
> http://lucene.472066.n3.nabble.com/Swapping-cores-with-SolrJ-tp1472154p1473435.html > Sent from the Solr - User mailing list archive at Nabble.com.