Package org.apache.solr.schema
Class NestPathField
java.lang.Object
org.apache.solr.schema.FieldProperties
org.apache.solr.schema.FieldType
org.apache.solr.schema.PrimitiveFieldType
org.apache.solr.schema.StrField
org.apache.solr.schema.NestPathField
To be used for field
IndexSchema.NEST_PATH_FIELD_NAME for enhanced nested doc
information. By defining a field type, we can encapsulate the configuration here so that the
schema is free of it. Alternatively, some notion of "implicit field types" would be cool and a
more general way of accomplishing this.- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.schema.FieldType
FieldType.DefaultAnalyzer, FieldType.MultiValueSelector -
Field Summary
Fields inherited from class org.apache.solr.schema.FieldType
ANALYZER, args, AUTO_GENERATE_PHRASE_QUERIES, CHAR_FILTER, CHAR_FILTERS, CLASS_NAME, docValuesFormat, ENABLE_GRAPH_QUERIES, falseProperties, FILTER, FILTERS, INDEX, INDEX_ANALYZER, MULTI_TERM, MULTI_TERM_ANALYZER, POLY_FIELD_SEPARATOR, postingsFormat, properties, QUERY, QUERY_ANALYZER, similarity, SIMILARITY, similarityFactory, SYNONYM_QUERY_STYLE, TOKENIZER, trueProperties, TYPE, TYPE_NAME, typeNameFields inherited from class org.apache.solr.schema.FieldProperties
BINARY, DOC_VALUES, INDEXED, LARGE_FIELD, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPAYLOADS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED, UNINVERTIBLE, USE_DOCVALUES_AS_STORED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.lucene.index.IndexableField> createFields(SchemaField field, Object value) Given aSchemaField, create one or moreIndexableFieldinstancesorg.apache.lucene.search.QuerygetFieldQuery(QParser parser, SchemaField field, String externalVal) Returns a Query instance for doing searches against a field.voidsetArgs(IndexSchema schema, Map<String, String> args) Initializes the field type.toInternal(String val) Convert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).Methods inherited from class org.apache.solr.schema.StrField
getBytesRef, getSingleValueSource, getSortField, getUninversionType, getValueSource, init, isUtf8Field, marshalSortValue, toObject, unmarshalSortValue, writeMethods inherited from class org.apache.solr.schema.PrimitiveFieldType
checkSupportsDocValues, enableDocValuesByDefault, getDefaultMultiValueSelectorForSortMethods inherited from class org.apache.solr.schema.FieldType
checkSchemaField, createField, createField, createFieldsFromAllValues, getAnalyzerProperties, getClassArg, getDocValuesFormat, getExistenceQuery, getFieldTermQuery, getIndexAnalyzer, getNamedPropertyValues, getNonFieldPropertyArgs, getNumberType, getNumericSort, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRangeQuery, getRewriteMethod, getSetQuery, getSimilarity, getSimilarityFactory, getSortedNumericSortField, getSortedSetSortField, getSortField, getSpecializedExistenceQuery, getSpecializedRangeQuery, getStringSort, getTypeName, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPointField, isPolyField, isTokenized, marshalBase64SortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, shouldCreateFieldsFromAllValues, storedToIndexed, storedToReadable, supportsAnalyzers, toExternal, toNativeType, toObject, toString, treatUnboundedRangeAsExistence, unmarshalBase64SortValue, unmarshalStringSortValue, useDocValuesAsStored, write
-
Constructor Details
-
NestPathField
public NestPathField()
-
-
Method Details
-
setArgs
Description copied from class:FieldTypeInitializes the field type. Subclasses should usually overrideFieldType.init(IndexSchema, Map)which is called by this method. -
createFields
Given aSchemaField, create one or moreIndexableFieldinstances Overridden to manipulate the indexed form (AKA terms), but not the DV form. The value may look something like/childA#0/childB#23and we want to strip out the pound-digits aspects.The terms index is used for block-join and docValues is used for returning nested docs in the same structure as given.
- Overrides:
createFieldsin classStrField- Parameters:
field- theSchemaFieldvalue- The value to add to the field- Returns:
- An array of
IndexableField - See Also:
-
toInternal
Description copied from class:FieldTypeConvert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).- Overrides:
toInternalin classFieldType- See Also:
-
getFieldQuery
public org.apache.lucene.search.Query getFieldQuery(QParser parser, SchemaField field, String externalVal) Description copied from class:FieldTypeReturns a Query instance for doing searches against a field.- Overrides:
getFieldQueryin classFieldType- Parameters:
parser- TheQParsercalling the methodfield- TheSchemaFieldof the field to searchexternalVal- The String representation of the value to search- Returns:
- The
Queryinstance. This implementation returns aTermQuerybut overriding queries may not
-