: I want to load full text into an external cache, So I added so codes
: in newSearcher where I found the warm up takes place. I add my codes

        ...

: public void newSearcher(SolrIndexSearcher newSearcher,
: SolrIndexSearcher currentSearcher) {
:     warmTextCache(newSearcher,warmTextCache,new String[]{"title","content"});

        ...

: in warmTextCache I need a reader to get some docs

        ...

: So I need a reader, When I contruct a reader by myself like:
: IndexReader reader=IndexReader.open(...);
: Or by core.getSearcher().get().getReader()

Don't do that -- the readers/searchers are refrenced counted by the 
SolrCore, so unless you "release" your refrences cleanly all you are 
likely to get into some interesting situations

the newSearcher method you are implementing directly gives you the 
SolrIndexSearcher (the "newSearcher" arg) that will be used along with 
your cache .  why don't you use it to get the reader (the 
getReader() method)instead of jumping through these hoops you've been 
trying? 

 



-Hoss

Reply via email to