Package org.apache.solr.handler.designer
Class SchemaDesignerAPI
java.lang.Object
org.apache.solr.handler.designer.SchemaDesignerAPI
- All Implemented Interfaces:
SchemaDesignerConstants
All V2 APIs have a prefix of /api/schema-designer/
-
Field Summary
Fields inherited from interface org.apache.solr.handler.designer.SchemaDesignerConstants
ANALYSIS_ERROR, AUTO_CREATE_FIELDS, CLEANUP_TEMP_PARAM, CONFIG_SET_PARAM, CONFIGOVERLAY_JSON, COPY_FROM_PARAM, DESIGNER_KEY, DESIGNER_PREFIX, DISABLE_DESIGNER_PARAM, DISABLED, DOC_ID_PARAM, ENABLE_DYNAMIC_FIELDS_PARAM, ENABLE_FIELD_GUESSING_PARAM, ENABLE_NESTED_DOCS_PARAM, ERROR_DETAILS, FIELD_PARAM, INDEX_TO_COLLECTION_PARAM, LANGUAGES_PARAM, MAX_SAMPLE_DOCS, NEW_COLLECTION_PARAM, PUBLISHED_VERSION, RELOAD_COLLECTIONS_PARAM, SCHEMA_VERSION_PARAM, SOLR_CONFIG_XML, TEMP_COLLECTION_PARAM, UNIQUE_KEY_FIELD_PARAM, UPDATE_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddErrorToResponse(String collection, org.apache.solr.common.SolrException solrExc, Map<Object, Throwable> errorsDuringIndexing, Map<String, Object> response, String updateError) voidaddSchemaObject(SolrQueryRequest req, SolrQueryResponse rsp) protected voidaddSettingsToResponse(org.apache.solr.handler.designer.SchemaDesignerSettings settings, Map<String, Object> response) voidanalyze(SolrQueryRequest req, SolrQueryResponse rsp) protected ManagedIndexSchemaanalyzeInputDocs(Map<String, List<Object>> docs, ManagedIndexSchema schema, List<String> langs) buildResponse(String configSet, ManagedIndexSchema schema, org.apache.solr.handler.designer.SchemaDesignerSettings settings, List<org.apache.solr.common.SolrInputDocument> docs) protected StringcheckMutable(String configSet, SolrQueryRequest req) protected voidcleanupTemp(String configSet) voidcleanupTemp(SolrQueryRequest req, SolrQueryResponse rsp) protected org.apache.solr.client.solrj.impl.CloudSolrClientvoiddownloadConfig(SolrQueryRequest req, SolrQueryResponse rsp) protected org.apache.solr.common.util.ContentStreamextractSingleContentStream(SolrQueryRequest req, boolean required) protected org.apache.solr.common.util.SimpleOrderedMap<Object> fieldToMap(SchemaField f, ManagedIndexSchema schema) voidgetFileContents(SolrQueryRequest req, SolrQueryResponse rsp) voidgetInfo(SolrQueryRequest req, SolrQueryResponse rsp) protected org.apache.solr.handler.designer.SchemaDesignerSettingsgetMutableSchemaForConfigSet(String configSet, int schemaVersion, String copyFrom) protected StringgetRequiredParam(String param, SolrQueryRequest req) voidgetSampleValue(SolrQueryRequest req, SolrQueryResponse rsp) voidgetSchemaDiff(SolrQueryRequest req, SolrQueryResponse rsp) Return the diff of designer schema with the source schema (either previously published or the copyFrom).indexSampleDocs(String idField, List<org.apache.solr.common.SolrInputDocument> docs, String collectionName, boolean asBatch) indexSampleDocsWithRebuildOnAnalysisError(String idField, List<org.apache.solr.common.SolrInputDocument> docs, String collectionName, boolean asBatch, String[] analysisErrorHolder) voidvoidlistConfigs(SolrQueryRequest req, SolrQueryResponse rsp) protected SampleDocumentsloadSampleDocuments(SolrQueryRequest req, String configSet) static SampleDocumentsLoaderstatic SchemaSuggestervoidprepNewSchema(SolrQueryRequest req, SolrQueryResponse rsp) voidpublish(SolrQueryRequest req, SolrQueryResponse rsp) voidquery(SolrQueryRequest req, SolrQueryResponse rsp) protected intvoidvoidprotected longwaitToSeeSampleDocs(String collectionName, long numAdded) protected org.apache.solr.common.cloud.ZkStateReader
-
Constructor Details
-
SchemaDesignerAPI
-
-
Method Details
-
newSchemaSuggester
-
newSampleDocumentsLoader
-
getInfo
- Throws:
IOException
-
prepNewSchema
public void prepNewSchema(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
cleanupTemp
public void cleanupTemp(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
getFileContents
- Throws:
IOException
-
updateFileContents
public void updateFileContents(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
getSampleValue
- Throws:
IOException
-
listCollectionsForConfig
-
listConfigs
- Throws:
IOException
-
listEnabledConfigs
- Throws:
IOException
-
downloadConfig
- Throws:
IOException
-
addSchemaObject
public void addSchemaObject(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
updateSchemaObject
public void updateSchemaObject(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
publish
public void publish(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
analyze
public void analyze(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
query
public void query(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
getSchemaDiff
Return the diff of designer schema with the source schema (either previously published or the copyFrom).- Throws:
IOException
-
loadSampleDocuments
protected SampleDocuments loadSampleDocuments(SolrQueryRequest req, String configSet) throws IOException - Throws:
IOException
-
analyzeInputDocs
protected ManagedIndexSchema analyzeInputDocs(Map<String, List<Object>> docs, ManagedIndexSchema schema, List<String> langs) -
getMutableSchemaForConfigSet
protected org.apache.solr.handler.designer.SchemaDesignerSettings getMutableSchemaForConfigSet(String configSet, int schemaVersion, String copyFrom) throws IOException - Throws:
IOException
-
extractSingleContentStream
protected org.apache.solr.common.util.ContentStream extractSingleContentStream(SolrQueryRequest req, boolean required) -
cloudClient
protected org.apache.solr.client.solrj.impl.CloudSolrClient cloudClient() -
zkStateReader
protected org.apache.solr.common.cloud.ZkStateReader zkStateReader() -
indexSampleDocsWithRebuildOnAnalysisError
protected Map<Object,Throwable> indexSampleDocsWithRebuildOnAnalysisError(String idField, List<org.apache.solr.common.SolrInputDocument> docs, String collectionName, boolean asBatch, String[] analysisErrorHolder) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
indexSampleDocs
protected Map<Object,Throwable> indexSampleDocs(String idField, List<org.apache.solr.common.SolrInputDocument> docs, String collectionName, boolean asBatch) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
waitToSeeSampleDocs
protected long waitToSeeSampleDocs(String collectionName, long numAdded) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
buildResponse
protected Map<String,Object> buildResponse(String configSet, ManagedIndexSchema schema, org.apache.solr.handler.designer.SchemaDesignerSettings settings, List<org.apache.solr.common.SolrInputDocument> docs) throws IOException - Throws:
IOException
-
addErrorToResponse
-
fieldToMap
protected org.apache.solr.common.util.SimpleOrderedMap<Object> fieldToMap(SchemaField f, ManagedIndexSchema schema) -
readJsonFromRequest
- Throws:
IOException
-
addSettingsToResponse
-
checkMutable
- Throws:
IOException
-
requireSchemaVersionFromClient
-
getRequiredParam
-
cleanupTemp
protected void cleanupTemp(String configSet) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-