The key here is you say "sometimes". It takes a while for the reload operation to propagate to _all_ the replicas that makeup your collection. My bet is that by immediately indexing after changing the data, your updates are getting to a core that hasn't reloaded yet.
That said, https://issues.apache.org/jira/browse/SOLR-8662 addresses this very issue I believe, but it's in 6.1 Best, Erick On Mon, Apr 18, 2016 at 1:34 PM, Hendrik Haddorp <hendrik.hadd...@gmx.net> wrote: > Hi, > > I'm using SolrCloud 6.0 with a managed schema. When I add fields using > SolrJ and immediately afterwards try to index data I sometimes get an > error telling me that a field that I just added does not exist. If I do > an explicit collection reload after the schema modification things seem > to work. Is that works as designed? > > According to https://cwiki.apache.org/confluence/display/solr/Schema+API > a core reload will happen automatically when using the schema API: "When > modifying the schema with the API, a core reload will automatically > occur in order for the changes to be available immediately for documents > indexed thereafter." > > regards, > Hendrik