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 Otis Gospodnetic <ot...@yahoo.com> on 2011/04/11 18:05:45 UTC

Reloading synonyms.txt without downtime

Hi,

Apparently, when one RELOADs a core, the synonyms file is not reloaded.  Is this 

the expected behaviour?  Is it the desired behaviour?

Here's the use-case:
When one is doing purely query-time synonym expansion, ideally one would be able 

to edit synonyms.txt and get it reloaded, so that the changes can start taking 
effect immediately.

One might think that RELOADing a Solr core would achieve this, but apparently 
this doesn't happen.  Should it?
Are there technical reasons why RELOADing a core should not reload the synonyms 
file? (other than if synonyms are used at index-time, changing the synonyms 
would mean that one has to reindex old docs in order for changes to synonyms to 
apply to old docs).

Issue https://issues.apache.org/jira/browse/SOLR-1307 mentions this a bit, but 
doesn't go in a lot of depth.

Thanks,
Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/

Re: Reloading synonyms.txt without downtime

Posted by Chris Hostetter <ho...@fucit.org>.
: Apparently, when one RELOADs a core, the synonyms file is not reloaded.  Is this 
: 
: the expected behaviour?  Is it the desired behaviour?

this is not expected, nor is it desired (by me) nor can i reproduce the 
problem you are talking about.

steps i attempted to reproduce:

1) started the example (on trunk)

2) loaded the analysis.jsp page, changed the field pulldown to "type" and 
entered "text" for the type name.  entered "bbbfoo" in the "Field value 
(Query)" box, and hit the button.

3) verified that synonym filter produced "bbbbar" as a query time synonym.

4) edited the example synony.txt file to add bbbxxxxxxx to the list of 
synonyms for bbbfoo

5) hit this url: 
http://localhost:8983/solr/admin/cores?action=RELOAD&core=collection1

6) went back to the analysis.jsp page and hit the button again.

7) verified that the results changed, and now bbbxxxxxxx was produced as 
well.

If you are seeing situations where after a core reload you do *not* see 
changes to the synonyms.txt file, then either there is an edge case bug, 
or perhaps you aren't changing what you think?

providing more details about your setup and steps to reproduce would be 
helpful.

: Issue https://issues.apache.org/jira/browse/SOLR-1307 mentions this a bit, but 
: doesn't go in a lot of depth.

I don't understand this sentence ... that issue is a feature request for a 
(new) general way for plugins to re-init themselves (or some aspect of 
their config) with out requing an entire core reload, i don't see any 
comments in that issue (other then the one where you mention this thread) 
suggesting that a core reload doesn't currently cause synonyms to reload 
... if you can be specific about what you mean that would be helpful.

-Hoss