Shalin is right about cache management, but fot the sake of knowledge, everytime you sendd a commit to Solr, it will close the old Searcher and open a new one.
2009/1/16 Shalin Shekhar Mangar <shalinman...@gmail.com> > On Fri, Jan 16, 2009 at 4:17 PM, Manupriya <manupriya.si...@gmail.com > >wrote: > > > > > Hi, > > > > We are using Solr as a standalone server. And our web application sends a > > HTTP request for searching. We receive JSON result back and use the > result. > > > > I had initailly asked about Searher > > (http://www.nabble.com/What-do-we-mean-by-Searcher--td21436737.html). > Now > > I > > understand it better. > > > > As per my understanding, when I send a search query for the first time, a > > new searcher is opened. And this searcher caters to subsequent requests > as > > well. When I stop the Solr server, the current searcher stops/closes with > > it. So on restarting, a new searcher will be initialized. > > > The first searcher is opened on startup. > > > > Now, I want to know , how can I close a current searcher and open a new > > searcher through HTTP request only? I donot want to restart the server to > > open a new searcher. > > > Why do you need to do that? > > > > We would be implementing caching for our application. And I read that in > > Solr, cached objects will be valid as long as the Searcher is valid. So > in > > order to properly manage cache, we would want to understand if there is > any > > way that we can close/open searcher through HTTP requests. > > > Solr automatically manages the cache correctly. Whenever a new commit > happens on the index, a new searcher is created, warmed up and then it > replaces the active searcher. All new requests then go to the new searcher. > The old searcher is closed after it has finished handling all the previous > requests which had been directed to it. > > The cache in Solr will never be stale. So you do not need to worry about > these things. > > > > > > > > Thanks, > > Manu > > > > > > -- > > View this message in context: > > > http://www.nabble.com/How-to-open-a-new-searcher-and-close-the-old-one-tp21496803p21496803.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > -- > Regards, > Shalin Shekhar Mangar. > -- Alexander Ramos Jardim