You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by gzyl <Gr...@gmail.com> on 2011/02/14 17:42:28 UTC

Solr 1.4 requestHandler "update" Runtime disable/enable

Is there a possibility at the runtime to disable or enable of update handler?

I have two servers and would like to turn off the update handler on master.
Then replicate master to slave and switch slave to master.


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-4-requestHandler-update-Runtime-disable-enable-tp2493745p2493745.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 1.4 requestHandler "update" Runtime disable/enable

Posted by Jan Høydahl <ja...@cominvent.com>.
> Ok.
> I can set it so:
> <requestHandler name="/update" class="solr.XmlUpdateRequestHandler"
> enable="${solr.enable.master:true}"/> 
> 
> But how without restarting Tomcat can I change solr.enable.master from true
> to false ??

That's an exercise left to the reader :)

Honestly, I don't think you need to. Why would you? The handler does not do anything if never called.

>> But I don't see why you need to disable it. 
>> You will anyway need to stop sending updates to the old master yourself. 
>> Disabling the handler like this will cause an exception if you try to call
> it because it will not be registered. 
> 
> I have a buffer in the application. So I do not have it off. 
> I have to switch automatically, without administrator intervention.
> 
> Application is switching from one location to other and solr must
> automatically follow the application.

One Solr server does not know about the other, so you do not need to "switch" anything
on the Solr side. You simply need to design your client in such a way that it handles
the operations in correct order and timing, i.e. that it pauses all feeding until replication
is done, then feeds to the new master instead of the old.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com


Re: Solr 1.4 requestHandler "update" Runtime disable/enable

Posted by gzyl <Gr...@gmail.com>.
Ok.
I can set it so:
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler"
enable="${solr.enable.master:true}"/> 

But how without restarting Tomcat can I change solr.enable.master from true
to false ??

>But I don't see why you need to disable it. 
>You will anyway need to stop sending updates to the old master yourself. 
>Disabling the handler like this will cause an exception if you try to call
it because it will not be registered. 

I have a buffer in the application. So I do not have it off. 
I have to switch automatically, without administrator intervention.

Application is switching from one location to other and solr must
automatically follow the application.



-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-4-requestHandler-update-Runtime-disable-enable-tp2493745p2500603.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 1.4 requestHandler "update" Runtime disable/enable

Posted by Jan Høydahl <ja...@cominvent.com>.
Sure.

  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" enable="${solr.enable.master:true}" />

Then set Java System Property -Dsolr.enable.master=false and restart.

But I don't see why you need to disable it. You will anyway need to stop sending updates to the old master yourself. Disabling the handler like this will cause an exception if you try to call it because it will not be registered.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 14. feb. 2011, at 17.42, gzyl wrote:

> 
> Is there a possibility at the runtime to disable or enable of update handler?
> 
> I have two servers and would like to turn off the update handler on master.
> Then replicate master to slave and switch slave to master.
> 
> 
> -- 
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-4-requestHandler-update-Runtime-disable-enable-tp2493745p2493745.html
> Sent from the Solr - User mailing list archive at Nabble.com.