Using StructureMap with Solrnet – updated

The implementation has now been updated to allow for multi-core instances. Which can be set up in your Bootstrapper like this:

var solr = (SolrConfigurationSection)ConfigurationManager.GetSection(“solr”);
var solrServers = solr.SolrServers;
x => x.AddRegistry(new SolrNetRegistry(solrServers))

You’re app config should look like the the following:

<section name="solr"
    type="StructureMap.SolrNetIntegration.Config.SolrConfigurationSection, SolrNet" />
<server id="myobject" url="http://localhost:8080/solr/"
documentType="Your.Objects.Name, Your.Objects.Namespace" />