title: trouble with solrnet when swapping cores
body: <p>I'm using SolrNet.0.3.1 and SolrNet.Ninject.0.3.1 in an ASP.NET MVC 3 app pointing to a Solr 3.4 instance. </p>
  
  <p>I'm using multiple cores so I can test out schema changes on a second core without breaking the app. Multiple cores are not the problem per se; the app happily uses "core-live" while I'm beating "core-ondeck" to death with dumb typos and tweaks to the schema. </p>
  
  <p>Solrnet's service location is http://[server]:8983/[solr-instance]/ and defaults to core-live via the instance's solr.xml defaultCoreName setting.</p>
  
  <pre><code># solrnet service location
  http://[server]:8983/[solr-instance]/
  
  # instance's solr.xml settings for multiple cores
  &lt;solr sharedLib="lib" persistent="true"&gt;
    &lt;cores adminPath="/admin/cores" defaultCoreName="core-live"&gt;
      &lt;core name="core-live" instanceDir="conf/core0/" /&gt;
      &lt;core name="core-ondeck" instanceDir="conf/core1/" /&gt;
    &lt;/cores&gt;
  &lt;/solr&gt;
  </code></pre>
  
  <p>After testing schema changes on the second core from Solr's browser admin GUI, I swap cores and the app should now use the core I just modified.</p>
  
  <pre><code># swap cores so app uses modified schema and index
  curl "http://[server]:8983/[solr-instance]/admin/cores?action=SWAP&amp;name=core-live&amp;other=core-ondeck"
  </code></pre>
  
  <p>Except solrnet doesn't take notice of the schema changes and, for example, blows up on a query because the field that was of type String in the old schema is now of type DateTime in the new.  </p>
  
  <pre><code>[ArgumentException: Object of type 'System.DateTime' cannot be converted to type 'System.String'.]
     System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) +6429224
     System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) +12711129
     System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) +129
     System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +522
     System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
     System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) +44
     SolrNet.Impl.DocumentPropertyVisitors.RegularDocumentVisitor.Visit(Object doc, String fieldName, XmlNode field) in c:\prg\SolrNet\svn\SolrNet\Impl\DocumentPropertyVisitors\RegularDocumentVisitor.cs:48
     SolrNet.Impl.DocumentPropertyVisitors.AggregateDocumentVisitor.Visit(Object doc, String fieldName, XmlNode field) in c:\prg\SolrNet\svn\SolrNet\Impl\DocumentPropertyVisitors\AggregateDocumentVisitor.cs:37
     SolrNet.Impl.DocumentPropertyVisitors.DefaultDocumentVisitor.Visit(Object doc, String fieldName, XmlNode field) in c:\prg\SolrNet\svn\SolrNet\Impl\DocumentPropertyVisitors\DefaultDocumentVisitor.cs:39
     SolrNet.Impl.SolrDocumentResponseParser`1.ParseDocument(XmlNode node, ICollection`1 fields) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrDocumentResponseParser.cs:65
     SolrNet.Impl.SolrDocumentResponseParser`1.ParseResults(XmlNode parentNode) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrDocumentResponseParser.cs:50
     SolrNet.Impl.ResponseParsers.ResultsResponseParser`1.Parse(XmlDocument xml, SolrQueryResults`1 results) in c:\prg\SolrNet\svn\SolrNet\Impl\ResponseParsers\ResultsResponseParser.cs:41
     SolrNet.Impl.SolrQueryResultParser`1.Parse(String r) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrQueryResultParser.cs:46
     SolrNet.Impl.SolrQueryExecuter`1.Execute(ISolrQuery q, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrQueryExecuter.cs:309
     SolrNet.Impl.SolrBasicServer`1.Query(ISolrQuery query, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrBasicServer.cs:83
     SolrNet.Impl.SolrServer`1.Query(ISolrQuery query, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrServer.cs:50
     Andornot.FhaPhem.Core.Search.SolrSearchOperations.GetResults(ISearchParameters searchParameters) in C:\svn\Client Projects\Fraser Health\PHEM\trunk\Web\Andornot.FhaPhem.Core\Search\SolrSearchOperations.cs:55
     Andornot.FhaPhem.Core.Search.SolrSearchOperations.Query(ISearchParameters searchParameters) in C:\svn\Client Projects\Fraser Health\PHEM\trunk\Web\Andornot.FhaPhem.Core\Search\SolrSearchOperations.cs:29
     Andornot.FhaPhem.Web.Controllers.SearchController.Results(Nullable`1 id) in C:\svn\Client Projects\Fraser Health\PHEM\trunk\Web\Andornot.FhaPhem.Web\Controllers\SearchController.cs:77
     lambda_method(Closure , ControllerBase , Object[] ) +118
     System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +264
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
     System.Web.Mvc.&lt;&gt;c__DisplayClass15.&lt;InvokeActionMethodWithFilters&gt;b__12() +129
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +826410
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +826410
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +314
     System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +825632
     System.Web.Mvc.Controller.ExecuteCore() +159
     System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
     System.Web.Mvc.&lt;&gt;c__DisplayClassb.&lt;BeginProcessRequest&gt;b__5() +62
     System.Web.Mvc.Async.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0() +20
     System.Web.Mvc.&lt;&gt;c__DisplayClasse.&lt;EndProcessRequest&gt;b__d() +54
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +375
  </code></pre>
  
  <p>How do I refresh solrnet's understanding of the schema on the fly, in a way that would work with core swapping?</p>