You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2008/07/31 21:26:13 UTC
[Solr Wiki] Update of "Solrj" by ShalinMangar
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by ShalinMangar:
http://wiki.apache.org/solr/Solrj
The comment on the change is:
EmbeddedSolrServer with MultiCores
------------------------------------------------------------------------------
...
}}}
+
+ If you want to use MultiCore features, then you should use this:
+ {{{
+ File home = new File( getSolrHome() );
+ File f = new File( home, "multicore.xml" );
+ multicore.load( getSolrHome(), f );
+
+ EmbeddedSolrServer server = new EmbeddedSolrServer( multicore, "core name as defined in multicore.xml" );
+ ...
+ }}}
If you need to use solr in an embedded application, this is the recommended approach. It allows you to work with the same interface whether or not you have access to HTTP.