: I just switched from using CommonHttpSolrServer to EmbeddedSolrServer and : the performance surprisingly deteriorated. I was expecting an improvement so : in my confusion i went to the stats page and noticed that the caches were no : longer getting hit. The embedded server however should still use : IndexSearcher from Lucene (which is what the caches are supposed to be : related to).
The way you phrased that paragraph makes me think that one of us doesn't understand what exactly you did when you "switched" ... When using CommonsHttpSolrServer in some application you write, you are talk to a remote server that is running Solr. when you use EmbeddedSolrServer, you are running solr directly within the application that you are writing. Now for starters: if the remote server you were running solr on is more powerful then the local machine you are running your java application on, that alone could explain some performance differences (likewise for JVM settings). Most importantly: when running solr embedded in your application, there is no "stats.jsp" page for you to look at -- because solr is no longer running in a servlet container. so if you are seeing stats on your solr server that say your caches aren't being hit, the reason is because the server isn't being hit at all. : Is there some kind of property that needs to be added or adjusted for : embedded server to use cache? Should I create my own cache and wipe the rest When running an embedded solr server, the filterCache and queryResultCache will still be used. the settings in the solrconfig.xml you specify when initializing the SolrCore will be honored. you can see use JMX to monitor those cache hit rates (assuming you have JMX enabled for your application, and the appropriate setting is in your solrconfig.xml) -Hoss