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 roz dev <ro...@gmail.com> on 2012/11/06 02:43:33 UTC

How to re-read the config files in Solr, on a commit

Hi All

I am keen to find out if Solr exposes any event listener or other hooks
which can be used to re-read configuration files.


I know that we have firstSearcher event but I am not sure if it causes
request handlers to reload themselves and read the conf files again.

For example, if I change the synonym file and solr gets a commit, will it
re-initialize request handlers and re-read the conf files.

Or, are there some events which can be listened to?

Any inputs are welcome.

Thanks
Saroj

Re: How to re-read the config files in Solr, on a commit

Posted by roz dev <ro...@gmail.com>.
Thanks Otis for pointing this out.

We may end up using search time synonyms for single word synonym and use
index time synonym for multi world synonyms.

-Saroj


On Tue, Nov 6, 2012 at 8:09 PM, Otis Gospodnetic <otis.gospodnetic@gmail.com
> wrote:

> Hi,
>
> Note about modifying synonyms - you need to reindex, really, if using
> index-time synonyms. And if you're using search-time synonyms you have
> multi-word synonym issue described on the Wiki.
>
> Otis
> --
> Performance Monitoring - http://sematext.com/spm
> On Nov 6, 2012 11:02 PM, "roz dev" <ro...@gmail.com> wrote:
>
> > Erick
> >
> > We have a requirement where seach admin can add or remove some synonyms
> and
> > would want these changes to be reflected in search thereafter.
> >
> > yes, we looked at reload command and it seems to be suitable for that
> > purpose. We have a master and slave setup so it should be OK to issue
> > reload command on master. I expect that slaves will pull the latest
> config
> > files.
> >
> > Is reload operation very costly, in terms of time and cpu? We have a
> > multicore setup and would need to issue reload on multiple cores.
> >
> > Thanks
> > Saroj
> >
> >
> > On Tue, Nov 6, 2012 at 5:02 AM, Erick Erickson <erickerickson@gmail.com
> > >wrote:
> >
> > > Not that I know of. This would be extremely expensive in the usual
> case.
> > > Loading up configs, reconfiguring all the handlers etc. would add a
> huge
> > > amount of overhead to the commit operation, which is heavy enough as it
> > is.
> > >
> > > What's the use-case here? Changing your configs really often and
> reading
> > > them on commit sounds like a way to make for a very confusing
> > application!
> > >
> > > But if you really need to re-read all this info on a running system,
> > > consider the core admin RELOAD command.
> > >
> > > Best
> > > Erick
> > >
> > >
> > > On Mon, Nov 5, 2012 at 8:43 PM, roz dev <ro...@gmail.com> wrote:
> > >
> > > > Hi All
> > > >
> > > > I am keen to find out if Solr exposes any event listener or other
> hooks
> > > > which can be used to re-read configuration files.
> > > >
> > > >
> > > > I know that we have firstSearcher event but I am not sure if it
> causes
> > > > request handlers to reload themselves and read the conf files again.
> > > >
> > > > For example, if I change the synonym file and solr gets a commit,
> will
> > it
> > > > re-initialize request handlers and re-read the conf files.
> > > >
> > > > Or, are there some events which can be listened to?
> > > >
> > > > Any inputs are welcome.
> > > >
> > > > Thanks
> > > > Saroj
> > > >
> > >
> >
>

Re: How to re-read the config files in Solr, on a commit

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Note about modifying synonyms - you need to reindex, really, if using
index-time synonyms. And if you're using search-time synonyms you have
multi-word synonym issue described on the Wiki.

Otis
--
Performance Monitoring - http://sematext.com/spm
On Nov 6, 2012 11:02 PM, "roz dev" <ro...@gmail.com> wrote:

> Erick
>
> We have a requirement where seach admin can add or remove some synonyms and
> would want these changes to be reflected in search thereafter.
>
> yes, we looked at reload command and it seems to be suitable for that
> purpose. We have a master and slave setup so it should be OK to issue
> reload command on master. I expect that slaves will pull the latest config
> files.
>
> Is reload operation very costly, in terms of time and cpu? We have a
> multicore setup and would need to issue reload on multiple cores.
>
> Thanks
> Saroj
>
>
> On Tue, Nov 6, 2012 at 5:02 AM, Erick Erickson <erickerickson@gmail.com
> >wrote:
>
> > Not that I know of. This would be extremely expensive in the usual case.
> > Loading up configs, reconfiguring all the handlers etc. would add a huge
> > amount of overhead to the commit operation, which is heavy enough as it
> is.
> >
> > What's the use-case here? Changing your configs really often and reading
> > them on commit sounds like a way to make for a very confusing
> application!
> >
> > But if you really need to re-read all this info on a running system,
> > consider the core admin RELOAD command.
> >
> > Best
> > Erick
> >
> >
> > On Mon, Nov 5, 2012 at 8:43 PM, roz dev <ro...@gmail.com> wrote:
> >
> > > Hi All
> > >
> > > I am keen to find out if Solr exposes any event listener or other hooks
> > > which can be used to re-read configuration files.
> > >
> > >
> > > I know that we have firstSearcher event but I am not sure if it causes
> > > request handlers to reload themselves and read the conf files again.
> > >
> > > For example, if I change the synonym file and solr gets a commit, will
> it
> > > re-initialize request handlers and re-read the conf files.
> > >
> > > Or, are there some events which can be listened to?
> > >
> > > Any inputs are welcome.
> > >
> > > Thanks
> > > Saroj
> > >
> >
>

Re: How to re-read the config files in Solr, on a commit

Posted by roz dev <ro...@gmail.com>.
Erick

We have a requirement where seach admin can add or remove some synonyms and
would want these changes to be reflected in search thereafter.

yes, we looked at reload command and it seems to be suitable for that
purpose. We have a master and slave setup so it should be OK to issue
reload command on master. I expect that slaves will pull the latest config
files.

Is reload operation very costly, in terms of time and cpu? We have a
multicore setup and would need to issue reload on multiple cores.

Thanks
Saroj


On Tue, Nov 6, 2012 at 5:02 AM, Erick Erickson <er...@gmail.com>wrote:

> Not that I know of. This would be extremely expensive in the usual case.
> Loading up configs, reconfiguring all the handlers etc. would add a huge
> amount of overhead to the commit operation, which is heavy enough as it is.
>
> What's the use-case here? Changing your configs really often and reading
> them on commit sounds like a way to make for a very confusing application!
>
> But if you really need to re-read all this info on a running system,
> consider the core admin RELOAD command.
>
> Best
> Erick
>
>
> On Mon, Nov 5, 2012 at 8:43 PM, roz dev <ro...@gmail.com> wrote:
>
> > Hi All
> >
> > I am keen to find out if Solr exposes any event listener or other hooks
> > which can be used to re-read configuration files.
> >
> >
> > I know that we have firstSearcher event but I am not sure if it causes
> > request handlers to reload themselves and read the conf files again.
> >
> > For example, if I change the synonym file and solr gets a commit, will it
> > re-initialize request handlers and re-read the conf files.
> >
> > Or, are there some events which can be listened to?
> >
> > Any inputs are welcome.
> >
> > Thanks
> > Saroj
> >
>

Re: How to re-read the config files in Solr, on a commit

Posted by Erick Erickson <er...@gmail.com>.
Not that I know of. This would be extremely expensive in the usual case.
Loading up configs, reconfiguring all the handlers etc. would add a huge
amount of overhead to the commit operation, which is heavy enough as it is.

What's the use-case here? Changing your configs really often and reading
them on commit sounds like a way to make for a very confusing application!

But if you really need to re-read all this info on a running system,
consider the core admin RELOAD command.

Best
Erick


On Mon, Nov 5, 2012 at 8:43 PM, roz dev <ro...@gmail.com> wrote:

> Hi All
>
> I am keen to find out if Solr exposes any event listener or other hooks
> which can be used to re-read configuration files.
>
>
> I know that we have firstSearcher event but I am not sure if it causes
> request handlers to reload themselves and read the conf files again.
>
> For example, if I change the synonym file and solr gets a commit, will it
> re-initialize request handlers and re-read the conf files.
>
> Or, are there some events which can be listened to?
>
> Any inputs are welcome.
>
> Thanks
> Saroj
>