thelabdude commented on a change in pull request #239:
URL: https://github.com/apache/solr/pull/239#discussion_r679431593



##########
File path: solr/solr-ref-guide/src/schema-designer.adoc
##########
@@ -0,0 +1,229 @@
+= Schema Designer
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+The Schema Designer screen lets you interactively design a new schema using 
sample data.
+
+.Schema Designer screen
+image::images/solr-admin-ui/schema-designer.png[image]
+
+There are a number of panels on the Schema Designer screen to provide 
immediate feedback when you make changes to the schema, including:
+
+* Upload / paste sample documents to find fields and guess the correct field 
type and indexing strategy
+* Schema Editor tree to edit Fields, Dynamic Fields, Field Types, and 
supporting Files
+* Text Analysis panel to show the text analysis pipeline for sample text based 
on the selected field
+* Query Tester panel to see how schema change impact query matching, sorting, 
faceting, and hit highlighting
+* Show Changes dialog to view a report of all changes made by the designer 
before publishing
+
+The Schema Designer allows you to edit an existing schema, however its main 
purpose is to help you safely design a new schema from sample data.
+You can safely experiment with changes and see the impact on query results 
immediately.
+Once data is indexed using a published schema, there are severe restrictions 
on the type of changes you can make to the schema without needing a full 
re-index.
+When designing a new schema, the Schema Designer re-indexes your sample data 
automatically when you make changes. However, the designer does not re-index 
data in collections using a published schema.
+
+.Security Requirements
+[NOTE]
+====
+If the <<rule-based-authorization-plugin.adoc#,Rule-based Authorization 
Plugin>> is enabled for your Solr installation, then users need to have the 
`config-edit` and `config-read` permissions to use the Schema Designer.
+====
+
+== Getting Started
+
+Upon entering the Schema Designer for the first time, you'll be prompted to 
create a New Schema.
+
+image::images/schema-designer/new-schema.png[image,width=600]
+
+Choose a short name that reflects the intended use case for your new schema. 
You'll need to choose a source schema to copy as the starting point for your 
new schema.
+Solr includes a `_default` schema which provides a good starting place for 
building a custom schema for your search application.
+Once a schema is published, it can be used to create new schemas and will be 
listed in the *Copy from* drop-down list in the dialog.
+
+Once you create the new schema, the next step is to upload or paste a sample 
of the data you intend to index into Solr.
+The Schema Designer supports JSON, CSV, TSV, XML, and JSON lines (jsonl).
+
+image::images/schema-designer/analyze-sample-docs.png[image,width=500]
+
+The advantage of pasting sample documents into the text area is that you can 
edit the sample and see the impact of your changes immediately in the analyzed 
schema.
+The upload feature is useful if you have large or many sample documents; the 
Schema Designer API allows up to 1,000 sample documents or a max of 5MB upload, 
but in most cases you only need a handful of documents to get started.
+
+Click on the *Analyze Documents* button to submit the sample documents to the 
Schema Designer API to generate your new schema.
+
+=== Temporary Configset and Collection
+
+Behind the scenes, the Schema Designer API creates a temporary 
<<config-sets.adoc#,Configset>> (schema + solrconfig.xml + supporting files) in 
Zookeeper.
+In addition, the Schema Designer API creates a temporary collection with a 
single shard and replica to hold sample documents.
+These temporary resources are persisted to disk and exist until the schema is 
published or manually deleted using the Schema Designer API cleanup endpoint 
(`/api/schema-designer/cleanup`).
+
+If you close your browser screen while designing a new schema, it will be 
available when you return.
+Simply choose the name of the schema you created previously in the select box 
and your schema will load into the designer UI.
+
+image::images/schema-designer/reload-schema.png[image,width=400]
+
+Previously uploaded sample documents are indexed in the temporary collection 
even though they do not display in the text area.
+
+[TIP]
+====
+Click on the *Edit Documents* button on the *Query Results* panel to load a 
JSON representation of indexed documents into the text area.
+====
+
+=== Iteratively Post Sample Documents
+
+If you have sample documents spread across multiple files, you can POST them 
to the Schema Designer API and then load your schema in the Designer UI to 
design your schema.

Review comment:
       right ... in this case, the Schema Designer API is mainly intended to 
support the UI and not really intended to be used directly. I'll make a note of 
that here ...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to