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 Kaneyama Genta <pe...@gmail.com> on 2013/03/28 10:11:04 UTC

How to update synonyms.txt without restart?

Dear all,

I investigating how to update synonyms.txt.
Some people says CORE RELOAD will reload synonyms.txt.

But solr wiki says:
```
Starting with Solr4.0, the RELOAD command is implemented in a way that
results a "live" reloads of the SolrCore, reusing the existing various
objects such as the SolrIndexWriter. As a result, some configuration
options can not be changed and made active with a simple RELOAD...
```
http://wiki.apache.org/solr/CoreAdmin#RELOAD

And https://issues.apache.org/jira/browse/SOLR-3592 is marked as unresolved.

Problem is How can I update synonyms.txt in production environment?
Workaround is restart Solr process. But it is not looks good for me.

Will someone tell me what is the best practice of synonyms.txt updating?

Thanks in advance.

Re: How to update synonyms.txt without restart?

Posted by Jack Krupansky <ja...@basetechnology.com>.
You should be fine for synonym and other schema changes since they are 
unrelated to the IndexWriter.

But... if you are using synonyms in your "index" analyzer, as opposed to in 
your "query" analyzer, then you need to do a full reindex anyway, which is 
best done by deleting the contents of the Solr data directory for the 
collection and restarting Solr and resending all of the source documents.

-- Jack Krupansky

-----Original Message----- 
From: Kaneyama Genta
Sent: Thursday, March 28, 2013 5:11 AM
To: solr-user@lucene.apache.org
Subject: How to update synonyms.txt without restart?

Dear all,

I investigating how to update synonyms.txt.
Some people says CORE RELOAD will reload synonyms.txt.

But solr wiki says:
```
Starting with Solr4.0, the RELOAD command is implemented in a way that
results a "live" reloads of the SolrCore, reusing the existing various
objects such as the SolrIndexWriter. As a result, some configuration
options can not be changed and made active with a simple RELOAD...
```
http://wiki.apache.org/solr/CoreAdmin#RELOAD

And https://issues.apache.org/jira/browse/SOLR-3592 is marked as unresolved.

Problem is How can I update synonyms.txt in production environment?
Workaround is restart Solr process. But it is not looks good for me.

Will someone tell me what is the best practice of synonyms.txt updating?

Thanks in advance. 


Re: How to update synonyms.txt without restart?

Posted by Erik Hatcher <er...@gmail.com>.
<https://issues.apache.org/jira/browse/SOLR-3587> (pointed to from SOLR-3592) indicates it is resolved.

I just tried it on my local 4x branch checkout, using the analysis page (text_general analyzing "foo"), added a synonym, went to core admin clicked "reload" and saw the synonym appear afterwards.

	Erik


On Mar 28, 2013, at 05:11 , Kaneyama Genta wrote:

> Dear all,
> 
> I investigating how to update synonyms.txt.
> Some people says CORE RELOAD will reload synonyms.txt.
> 
> But solr wiki says:
> ```
> Starting with Solr4.0, the RELOAD command is implemented in a way that
> results a "live" reloads of the SolrCore, reusing the existing various
> objects such as the SolrIndexWriter. As a result, some configuration
> options can not be changed and made active with a simple RELOAD...
> ```
> http://wiki.apache.org/solr/CoreAdmin#RELOAD
> 
> And https://issues.apache.org/jira/browse/SOLR-3592 is marked as unresolved.
> 
> Problem is How can I update synonyms.txt in production environment?
> Workaround is restart Solr process. But it is not looks good for me.
> 
> Will someone tell me what is the best practice of synonyms.txt updating?
> 
> Thanks in advance.


Re: How to update synonyms.txt without restart?

Posted by Mark Miller <ma...@gmail.com>.
Though I think *another* JIRA made data dir not changeable over core reload for some reason I don't recall exactly. But the other stuff is back to being changeable :)

- Mark

On Mar 28, 2013, at 8:04 PM, Mark Miller <ma...@gmail.com> wrote:

> But this is fixed in 4.2 - now the index writer is rebooted on core reload.
> 
> So that's just 4.0 and 4.1.
> 
> - Mark
> 
> On Mar 28, 2013, at 6:48 PM, Chris Hostetter <ho...@fucit.org> wrote:
> 
>> 
>> : But solr wiki says:
>> : ```
>> : Starting with Solr4.0, the RELOAD command is implemented in a way that
>> : results a "live" reloads of the SolrCore, reusing the existing various
>> : objects such as the SolrIndexWriter. As a result, some configuration
>> : options can not be changed and made active with a simple RELOAD...
>> 
>> Directly below that sentence are bullet points listing exactly which 
>> config options can't be changed with a simple reload...
>> 
>>>>> * IndexWriter related settings in <indexConfig>
>>>>> * <dataDir> location 
>> 
>> : http://wiki.apache.org/solr/CoreAdmin#RELOAD
>> 
>> 
>> -Hoss
> 


Re: How to update synonyms.txt without restart?

Posted by Mark Miller <ma...@gmail.com>.
But this is fixed in 4.2 - now the index writer is rebooted on core reload.

So that's just 4.0 and 4.1.

- Mark

On Mar 28, 2013, at 6:48 PM, Chris Hostetter <ho...@fucit.org> wrote:

> 
> : But solr wiki says:
> : ```
> : Starting with Solr4.0, the RELOAD command is implemented in a way that
> : results a "live" reloads of the SolrCore, reusing the existing various
> : objects such as the SolrIndexWriter. As a result, some configuration
> : options can not be changed and made active with a simple RELOAD...
> 
> Directly below that sentence are bullet points listing exactly which 
> config options can't be changed with a simple reload...
> 
>>>>  * IndexWriter related settings in <indexConfig>
>>>>  * <dataDir> location 
> 
> : http://wiki.apache.org/solr/CoreAdmin#RELOAD
> 
> 
> -Hoss


Re: How to update synonyms.txt without restart?

Posted by Chris Hostetter <ho...@fucit.org>.
: But solr wiki says:
: ```
: Starting with Solr4.0, the RELOAD command is implemented in a way that
: results a "live" reloads of the SolrCore, reusing the existing various
: objects such as the SolrIndexWriter. As a result, some configuration
: options can not be changed and made active with a simple RELOAD...

Directly below that sentence are bullet points listing exactly which 
config options can't be changed with a simple reload...

>>>   * IndexWriter related settings in <indexConfig>
>>>   * <dataDir> location 

: http://wiki.apache.org/solr/CoreAdmin#RELOAD


-Hoss

Re: How to update synonyms.txt without restart?

Posted by Upayavira <uv...@odoko.co.uk>.
Not sure, but if you put it in the data dir, I think it picks it up and
reloads on commit.

Upayavira

On Thu, Mar 28, 2013, at 09:11 AM, Kaneyama Genta wrote:
> Dear all,
> 
> I investigating how to update synonyms.txt.
> Some people says CORE RELOAD will reload synonyms.txt.
> 
> But solr wiki says:
> ```
> Starting with Solr4.0, the RELOAD command is implemented in a way that
> results a "live" reloads of the SolrCore, reusing the existing various
> objects such as the SolrIndexWriter. As a result, some configuration
> options can not be changed and made active with a simple RELOAD...
> ```
> http://wiki.apache.org/solr/CoreAdmin#RELOAD
> 
> And https://issues.apache.org/jira/browse/SOLR-3592 is marked as
> unresolved.
> 
> Problem is How can I update synonyms.txt in production environment?
> Workaround is restart Solr process. But it is not looks good for me.
> 
> Will someone tell me what is the best practice of synonyms.txt updating?
> 
> Thanks in advance.