Li Enlai created SOLR-18563:
-------------------------------
Summary: Apply additive Schema API updates without a core reload
Key: SOLR-18563
URL: https://issues.apache.org/jira/browse/SOLR-18563
Project: Solr
Issue Type: Improvement
Components: Schema and Analysis
Reporter: Li Enlai
h2. Problem
Solr's schemaless mode adds a field without a core reload: it persists the
managed schema and installs it with {{SolrCore#setLatestSchema()}}.
The Schema API does not. {{add-field}}, {{add-dynamic-field}} and
{{add-copy-field}} reload every core using the configset. Reload replaces the
{{IndexWriter}} and waits for running merges, so indexing pauses until those
merges finish. On a small index the pause is short. It lasts as long as the
merges already running.
h2. Proposed change
When a request contains only {{add-field}}, {{add-dynamic-field}} and
{{add-copy-field}}, do what schemaless mode already does: persist the managed
schema and install it with {{setLatestSchema()}}, without reloading the core.
This writes the managed-schema znode and does not touch the configset znode, so
the configset listener does not reload other replicas. Those replicas already
install the schema from the managed-schema watch.
Indexing can use the new field as soon as the command returns. In standalone
mode the core opens a new searcher before responding, which keeps SOLR-13795.
In SolrCloud, queries see the new field after the next commit or soft commit.
Delete, replace, field-type and mixed requests still reload the core.
h2. Discussion
https://lists.apache.org/thread/3ogs0hjfw89h4w78mzm8rsfpzgdkx2r6
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]