public final class ManagedIndexSchema extends IndexSchema
Modifier and Type | Class and Description |
---|---|
class |
ManagedIndexSchema.FieldExistsException |
class |
ManagedIndexSchema.SchemaChangedInZkException |
IndexSchema.DynamicCopy, IndexSchema.DynamicField, IndexSchema.DynamicReplacement
COPY_FIELD, COPY_FIELDS, copyFieldsMap, copyFieldTargetCounts, DEFAULT_OPERATOR, DEFAULT_SCHEMA_FILE, DEFAULT_SEARCH_FIELD, defaultSearchFieldName, DESTINATION, DYNAMIC_FIELD, DYNAMIC_FIELDS, dynamicCopyFields, dynamicFields, FIELD, FIELD_TYPE, FIELD_TYPES, fields, FIELDS, fieldsWithDefaultValue, fieldTypes, INTERNAL_POLY_FIELD_PREFIX, isExplicitQueryParserDefaultOperator, isExplicitSimilarity, loader, LUCENE_MATCH_VERSION_PARAM, name, NAME, queryParserDefaultOperator, REQUIRED, requiredFields, resourceName, SCHEMA, schemaAware, similarity, SIMILARITY, similarityFactory, SLASH, SOLR_QUERY_PARSER, solrConfig, SOURCE, TYPE, TYPES, UNIQUE_KEY, uniqueKeyField, uniqueKeyFieldName, uniqueKeyFieldType, version, VERSION
Modifier and Type | Method and Description |
---|---|
ManagedIndexSchema |
addCopyFields(Map<String,Collection<String>> copyFields)
Copies this schema and adds the new copy fields to the copy, then
persists the new schema.
|
ManagedIndexSchema |
addField(SchemaField newField)
Copies this schema, adds the given field to the copy, then persists the
new schema.
|
ManagedIndexSchema |
addField(SchemaField newField,
Collection<String> copyFieldNames)
Copies this schema, adds the given field to the copy, then persists the
new schema.
|
ManagedIndexSchema |
addFields(Collection<SchemaField> newFields)
Copies this schema, adds the given fields to the copy, then persists the
new schema.
|
ManagedIndexSchema |
addFields(Collection<SchemaField> newFields,
Map<String,Collection<String>> copyFieldNames)
Copies this schema, adds the given fields to the copy, then persists the
new schema.
|
Object |
getSchemaUpdateLock()
Returns the schema update lock that should be synchronzied on
to update the schema.
|
boolean |
isMutable() |
SchemaField |
newField(String fieldName,
String fieldType,
Map<String,?> options)
Returns a SchemaField if the given fieldName does not already
exist in this schema, and does not match any dynamic fields
in this schema.
|
getAnalyzer, getCopyFieldProperties, getCopyFieldsList, getCopyFieldsMap, getCopySources, getDefaultLuceneMatchVersion, getDefaultSearchFieldName, getDynamicCopyFields, getDynamicFieldPrototypes, getDynamicFields, getDynamicFieldType, getDynamicPattern, getField, getFieldOrNull, getFields, getFieldsWithDefaultValue, getFieldType, getFieldTypeByName, getFieldTypeNoEx, getFieldTypes, getIndexAnalyzer, getNamedPropertyValues, getQueryAnalyzer, getQueryParserDefaultOperator, getRequiredFields, getResourceLoader, getResourceName, getSchemaName, getSimilarity, getSimilarityFactory, getUniqueKeyField, getUniqueKeyField, getVersion, hasExplicitField, isCopyFieldTarget, isDynamicField, loadCopyFields, loadFields, printableUniqueKey, readSchema, refreshAnalyzers, registerCopyField, registerCopyField, registerDynamicFields, setResourceName
public boolean isMutable()
isMutable
in class IndexSchema
public ManagedIndexSchema addField(SchemaField newField)
IndexSchema
IndexSchema.getSchemaUpdateLock()
.addField
in class IndexSchema
newField
- the SchemaField to addIndexSchema.newField(String, String, Map)
public ManagedIndexSchema addField(SchemaField newField, Collection<String> copyFieldNames)
IndexSchema
IndexSchema.getSchemaUpdateLock()
.addField
in class IndexSchema
newField
- the SchemaField to addcopyFieldNames
- 0 or more names of targets to copy this field to. The targets must already exist.IndexSchema.newField(String, String, Map)
public ManagedIndexSchema addFields(Collection<SchemaField> newFields)
IndexSchema
IndexSchema.getSchemaUpdateLock()
.addFields
in class IndexSchema
newFields
- the SchemaFields to addIndexSchema.newField(String, String, Map)
public ManagedIndexSchema addFields(Collection<SchemaField> newFields, Map<String,Collection<String>> copyFieldNames)
IndexSchema
IndexSchema.getSchemaUpdateLock()
.addFields
in class IndexSchema
newFields
- the SchemaFields to addcopyFieldNames
- 0 or more names of targets to copy this field to. The target fields must already exist.IndexSchema.newField(String, String, Map)
public ManagedIndexSchema addCopyFields(Map<String,Collection<String>> copyFields)
IndexSchema
IndexSchema.getSchemaUpdateLock()
.addCopyFields
in class IndexSchema
copyFields
- Key is the name of the source field name, value is a collection of target field names. Fields must exist.public SchemaField newField(String fieldName, String fieldType, Map<String,?> options)
IndexSchema
IndexSchema.addField(SchemaField)
.newField
in class IndexSchema
fieldName
- the name of the field to addfieldType
- the field type for the new fieldoptions
- the options to use when creating the SchemaFieldIndexSchema.addField(SchemaField)
public Object getSchemaUpdateLock()
IndexSchema
getSchemaUpdateLock
in class IndexSchema
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.