Package org.apache.solr.handler.designer
Class DefaultSchemaSuggester
java.lang.Object
org.apache.solr.handler.designer.DefaultSchemaSuggester
- All Implemented Interfaces:
SchemaSuggester,NamedListInitializedPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadaptExistingFieldToData(SchemaField schemaField, List<Object> sampleValues, ManagedIndexSchema schema) guessFieldProps(String fieldName, FieldType fieldType, List<Object> sampleValues, boolean isMV, IndexSchema schema) protected StringguessFieldType(List<Object> sampleValues, boolean isMV, Locale locale) voidinit(org.apache.solr.common.util.NamedList<?> args) initwill be called just once, immediately after creation.protected voidinitBooleanParsing(org.apache.solr.common.util.NamedList<?> args) protected voidinitDateTimeFormatters(org.apache.solr.common.util.NamedList<?> args) protected booleanprotected booleanisDateTime(List<Object> values) protected StringisFloatOrDouble(List<Object> values, Locale locale) protected StringisIntOrLong(List<Object> values, Locale locale) booleanisMultiValued(String name, List<org.apache.solr.common.SolrInputDocument> docs) protected booleanisMultiValued(List<Object> sampleValues) protected booleansuggestField(String fieldName, List<Object> sampleValues, IndexSchema schema, List<String> langs) transposeDocs(List<org.apache.solr.common.SolrInputDocument> docs) protected voidvalidateNumericTypeChange(SchemaField field, FieldType toType, List<org.apache.solr.common.SolrInputDocument> docs, NumberType toNumType) voidvalidateTypeChange(SchemaField field, FieldType toType, List<org.apache.solr.common.SolrInputDocument> docs)
-
Constructor Details
-
DefaultSchemaSuggester
public DefaultSchemaSuggester()
-
-
Method Details
-
validateTypeChange
public void validateTypeChange(SchemaField field, FieldType toType, List<org.apache.solr.common.SolrInputDocument> docs) throws IOException - Specified by:
validateTypeChangein interfaceSchemaSuggester- Throws:
IOException
-
validateNumericTypeChange
protected void validateNumericTypeChange(SchemaField field, FieldType toType, List<org.apache.solr.common.SolrInputDocument> docs, NumberType toNumType) -
suggestField
public Optional<SchemaField> suggestField(String fieldName, List<Object> sampleValues, IndexSchema schema, List<String> langs) - Specified by:
suggestFieldin interfaceSchemaSuggester
-
adaptExistingFieldToData
public ManagedIndexSchema adaptExistingFieldToData(SchemaField schemaField, List<Object> sampleValues, ManagedIndexSchema schema) - Specified by:
adaptExistingFieldToDatain interfaceSchemaSuggester
-
transposeDocs
- Specified by:
transposeDocsin interfaceSchemaSuggester
-
guessFieldType
-
isText
-
isFloatOrDouble
-
isBoolean
-
isIntOrLong
-
isDateTime
-
isMultiValued
- Specified by:
isMultiValuedin interfaceSchemaSuggester
-
isMultiValued
-
guessFieldProps
-
init
public void init(org.apache.solr.common.util.NamedList<?> args) Description copied from interface:NamedListInitializedPlugininitwill be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Specified by:
initin interfaceNamedListInitializedPlugin- Parameters:
args- non-null list of initialization parameters (may be empty)
-
initDateTimeFormatters
protected void initDateTimeFormatters(org.apache.solr.common.util.NamedList<?> args) -
initBooleanParsing
protected void initBooleanParsing(org.apache.solr.common.util.NamedList<?> args)
-