lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: AW: refreshing synonyms.txt - or other configs
Date Mon, 12 Apr 2010 21:33:09 GMT
> You could make your own little plugin RequestHandler that
> did the reload 
> though. The RQ could get the CoreContainer from the
> SolrCore retrieved 
> from the request, and then call reload on the "" core.
> 

Awesome, this piece of code reloaded schema.xml, stopwords.txt etc. Thanx!

public class DummyRequestHandler extends RequestHandlerBase {
    public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
{
        req.getCore().getCoreDescriptor().getCoreContainer().reload("");
        rsp.add("message", "core reloaded");
    }
}


      

Mime
View raw message