Solr Core not able access latest data indexed by multiple server.

2012-04-18 Thread Paresh Modi
Hi,

I am using Solr multicore approach in my app. we have two different servers
(ServerA1 and ServerA2) for load balancing, both the server accessing the
same index repository and request will go to any server as per load balance
algorithm. 

Problem occurs in following way [Note that both the servers accessing the
same physical location(index)].

- ADD TO INDEX request for File1 go to ServerA1 for core CR1, core CR1
loaded in ServerA1 and indexing done.
- ADD TO INDEX request for File2 go to ServerA2 for core CR1, core CR1
loaded in ServerA2 and indexing done.
- SEARCH request for File2 go to ServerA1, now here core CR1 is already
loaded so it directly access the index but File2 added by ServerA2 is not
found in core loaded by ServerA1.

So this is the problem, File2 indexed by core CR1 loaded in ServerA2 is not
available in core CR1 loaded by ServerA1.


I have searched and found that the solution to this problem is reload the
CORE. when you reload the core, it will have latest indexed data. but
reloading the Core for every request is very heavy and time consuming
process.

Please let me know if anyone has any solution for this.


Waiting for your expert advice.


Thanks
Paresh

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Core-not-able-access-latest-data-indexed-by-multiple-server-tp3919113p3919113.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr Core not able access latest data indexed by multiple server.

2012-04-18 Thread Erick Erickson
I think you're trying to do something that's you shouldn't. The trunk
SolrCloud stuff will address this issue, but for the 3.x code line having
multiple servers opening up a shared index and writing to it will produce
unpredictable results. This is really bad practice.

You'd be far ahead setting up one of these machines as a master,
the other as a slave, and always indexing to the master.

Best
Erick

On Wed, Apr 18, 2012 at 1:17 AM, Paresh Modi pm...@asite.com wrote:
 Hi,

 I am using Solr multicore approach in my app. we have two different servers
 (ServerA1 and ServerA2) for load balancing, both the server accessing the
 same index repository and request will go to any server as per load balance
 algorithm.

 Problem occurs in following way [Note that both the servers accessing the
 same physical location(index)].

 - ADD TO INDEX request for File1 go to ServerA1 for core CR1, core CR1
 loaded in ServerA1 and indexing done.
 - ADD TO INDEX request for File2 go to ServerA2 for core CR1, core CR1
 loaded in ServerA2 and indexing done.
 - SEARCH request for File2 go to ServerA1, now here core CR1 is already
 loaded so it directly access the index but File2 added by ServerA2 is not
 found in core loaded by ServerA1.

 So this is the problem, File2 indexed by core CR1 loaded in ServerA2 is not
 available in core CR1 loaded by ServerA1.


 I have searched and found that the solution to this problem is reload the
 CORE. when you reload the core, it will have latest indexed data. but
 reloading the Core for every request is very heavy and time consuming
 process.

 Please let me know if anyone has any solution for this.


 Waiting for your expert advice.


 Thanks
 Paresh

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Solr-Core-not-able-access-latest-data-indexed-by-multiple-server-tp3919113p3919113.html
 Sent from the Solr - User mailing list archive at Nabble.com.