Sorry to pull this up again, but I've faced a similar issue and would like to
share the solution.

In my situation, I uses SolrQueryRequest, SolrCore, SolrQueryResponse to
explicitly perform the search.
The gotcha from my code is that I didn't call SolrQueryRequest.close() hence
the increasing memory in FieldCache everytime index is updated. Calling
SolrQueryRequest.close() solves the problem, you should see items disappear
from FieldCache (JMX) as soon as new searcher is registered.

My corrected code is


SolrQueryRequest request = buildSolrQueryRequest();
try {
     SolrQueryResponse response = new SolrQueryResponse();
     SolrRequestHandler handler = getSolrRequestHandler();
     core.execute(handler, request, response);
     return response;
} finally {
     request.close();
}



--
View this message in context: 
http://lucene.472066.n3.nabble.com/fieldCache-problem-OOM-exception-tp3067057p3358290.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to