title: Sunspot Solr new fields not being indexed
body: <p>I'm using Sunspot Solr (2.2.7) to search and index an AR model in our app but we're doing something a little differently here.  The actual indexable content is stored in a serialized field and I've extended the Sunspot::Adapters::InstanceAdapter and the Sunspot::Adapters::DataAccessor classes to support our use case and registered these adapters.</p>
  
  <p>I define the indexable fields in a config/initializers/sunspot.rb class and an example configuration looks like</p>
  
  <pre><code>Sunspot.setup(Office) do
    time :published_at, trie: true
    integer :id
    text :name
    integer :region_id
    boolean :is_active
    text :address
    text :city
    text :postal_area
    string :postal_code
    string :abbreviation
    integer :person_ids, multiple: true
    string :supported_locales, multiple: true
    string :slug
  end
  </code></pre>
  
  <p>Everything seems to be working on development and on production (Ubuntu 16.04 running Solr 6.4.2).</p>
  
  <p>The problem I'm encountering occurs when I need to add a new field to the index and try to get this change to production.  When I add the above line to the Sunspot.setup block</p>
  
  <pre><code>integer :department_ids, multiple: true
  </code></pre>
  
  <p>to the setup of the Office and re-index, it works on my local machine but when I deploy to production, the new field doesn't get picked up.  </p>
  
  <p>I've updated the managed-schema file to include the new field but after I reindex the models, I still do not see the new field when I query for Offices in the query tool.</p>
  
  <p>A sample JSON response for an Office being return looks something like:</p>
  
  <pre><code>{
    "id":"Office 1",
    "type":["Office", "Model"],
    "class_name":["Office"],
    "published_at_dt":"2017-03-22T23:32:22Z",
    "id_i":1,
    "search_name_s":"atlanta",
    "region_id_i":2,
    "is_active_b":true,
    "postal_code_s":"30309",
    "abbreviation_s":"ATL",
    "person_ids_im":[513,
      571,
      1392,
      1722,
      1723],
    "supported_locales_sm":["en"],
    "slug_s":"houston",
    "name_text":["Houston"],
    "address_text":["1 Main Street&lt;br/&gt;Suite 1"],
    "city_text":["Houston"],
    "postal_area_text":["TX"],
    "_version_":1565750688671072256},
  
  }
  </code></pre>
  
  <p>I've set the log_level to DEBUG but the SOLR update statement doesn't tell me much.</p>
  
  <pre><code>SOLR Request (1.6ms)  [ path=update parameters={} ]
  </code></pre>
  
  <p>I've tried going into the Rails console on production, manually running</p>
  
  <pre><code>Sunspot.remove_all!(Office)
  </code></pre>
  
  <p>and then running my index task but the field still doesn't get picked up.</p>
  
  <p>I'm uncertain as to how to debug this issue further.  </p>
  
  <p>Is the issue in a change I need to make to managed-schema (there's no schema.xml in my conf directory, just the managed-schema file).  The field is defined there and running queries for that field works, but returns 0 results.</p>
  
  <p>Is the issue that the Sunspot.setup code in my initializer requires a full stop of Apache2 and Sunspot in order to pick up my changes?  I've tried that as well but didn't see a change.  </p>
  
  <p>Or is the issue in that I'm not using the default Rails AR include due to the slightly different use case we have and there are missing methods that I need to implement in my adapter/indexable class?</p>
  
  <p>Any help on this would be greatly appreciated.</p>