How to refresh after updating synonyms.txt?

814 views
Skip to first unread message

Bashar3A

unread,
Sep 16, 2011, 12:58:15 PM9/16/11
to Sunspot
Hi,

I want to understand how the process works. When I update the
synonyms.txt, how do I refresh and tell Sunspot to use the new
synonyms? Does it happen with next index, or restart?

Andy Lindeman

unread,
Sep 16, 2011, 1:45:19 PM9/16/11
to ruby-s...@googlegroups.com

One way I know will work is restarting Solr.

There might be a programmatic way to tell Solr to reload its config ..
or possibly a SIGHUP, but I don't know that for sure.

--
Andy Lindeman
http://www.andylindeman.com/

Bashar3A

unread,
Sep 16, 2011, 1:50:18 PM9/16/11
to Sunspot
Thanks. I was hoping to avoid the restart, but at least I know now

On Sep 16, 8:45 pm, Andy Lindeman <alinde...@gmail.com> wrote:

Nick Zadrozny

unread,
Sep 16, 2011, 2:20:01 PM9/16/11
to ruby-s...@googlegroups.com
On Fri, Sep 16, 2011 at 10:50 AM, Bashar3A <bashar....@gmail.com> wrote:
Thanks. I was hoping to avoid the restart, but at least I know now

Yeah, the Solr restart is necessary. You'll probably also want to reindex as well.

Synonym transformation can take effect both at query time and at index time. So depending on the nature of your synonyms (expansion, simple transformation) you may create some odd cases that affect relevancy or get incorrect results until you reindex.

--
Nick Zadrozny

http://websolr.com — hassle-free hosted search, powered by Apache Solr

Bashar3A

unread,
Sep 16, 2011, 2:21:50 PM9/16/11
to Sunspot
Thanks Nick. I'll do that then.

On Sep 16, 9:20 pm, Nick Zadrozny <n...@onemorecloud.com> wrote:

Jay Luker

unread,
Sep 28, 2011, 12:19:24 PM9/28/11
to Sunspot
Just stumbled on this thread while googling for something related.
Figured it's not too late to chime in.

To avoid the restart you could configure Solr multi-core [1]. Then you
can simply do a core RELOAD to refresh the synonyms. Much easier to
automate and avoids the downtime.

--jay

[1] http://wiki.apache.org/solr/CoreAdmin

Bashar3A

unread,
Sep 28, 2011, 12:51:30 PM9/28/11
to Sunspot
Thanks Jay. Will need to look into it.
Reply all
Reply to author
Forward
0 new messages