Package com.atlassian.jira.search.index
Class DefaultIndexSchema.Builder
java.lang.Object
com.atlassian.jira.search.index.DefaultIndexSchema.Builder
- All Implemented Interfaces:
IndexSchema.Builder
- Enclosing class:
DefaultIndexSchema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a field to the schemaAdds multiple fields to the schemaaddFields(Collection<Field> fields) Adds multiple fields to the schemaaddRelation(String parentDocumentType, String childDocumentType) Adds a relation between two document typesaddRelations(String parentDocumentType, Collection<String> childDocumentTypes) Adds a relation between a parent document type and multiple child document typesbuild()Builds the schemabooleanfieldIsDefined(String fieldName) Checks if a field is defined in the schemaremoveField(String fieldName) Removes a field from the schemasetFields(Collection<Field> fields) Sets the schema fieldssetRelations(Map<String, Collection<String>> relations) Sets the relations between document types, replacing any existing relationsversionField(LongField versionField)
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
versionField
- Specified by:
versionFieldin interfaceIndexSchema.Builder- Parameters:
versionField- the field to be used as the version field- Returns:
- the builder
-
setFields
Description copied from interface:IndexSchema.BuilderSets the schema fields- Specified by:
setFieldsin interfaceIndexSchema.Builder- Parameters:
fields- the schema fields- Returns:
- the builder
-
addField
Description copied from interface:IndexSchema.BuilderAdds a field to the schema- Specified by:
addFieldin interfaceIndexSchema.Builder- Parameters:
field- the field to be added to the schema- Returns:
- the builder
-
addFields
Description copied from interface:IndexSchema.BuilderAdds multiple fields to the schema- Specified by:
addFieldsin interfaceIndexSchema.Builder- Parameters:
fields- the fields to be added to the schema- Returns:
- the builder
-
addFields
Description copied from interface:IndexSchema.BuilderAdds multiple fields to the schema- Specified by:
addFieldsin interfaceIndexSchema.Builder- Parameters:
fields- the fields to be added to the schema- Returns:
- the builder
-
removeField
Description copied from interface:IndexSchema.BuilderRemoves a field from the schema- Specified by:
removeFieldin interfaceIndexSchema.Builder- Parameters:
fieldName- the name of the field to be removed. Does nothing if the field is not present- Returns:
- the builder
-
fieldIsDefined
Description copied from interface:IndexSchema.BuilderChecks if a field is defined in the schema- Specified by:
fieldIsDefinedin interfaceIndexSchema.Builder- Parameters:
fieldName- the name of the field to check- Returns:
- true if the field is defined, false otherwise
-
addRelation
Description copied from interface:IndexSchema.BuilderAdds a relation between two document types- Specified by:
addRelationin interfaceIndexSchema.Builder- Parameters:
parentDocumentType- the parent document typechildDocumentType- the child document type- Returns:
- the builder
-
addRelations
public IndexSchema.Builder addRelations(String parentDocumentType, Collection<String> childDocumentTypes) Description copied from interface:IndexSchema.BuilderAdds a relation between a parent document type and multiple child document types- Specified by:
addRelationsin interfaceIndexSchema.Builder- Parameters:
parentDocumentType- the parent document typechildDocumentTypes- the child document types- Returns:
- the builder
-
setRelations
Description copied from interface:IndexSchema.BuilderSets the relations between document types, replacing any existing relations- Specified by:
setRelationsin interfaceIndexSchema.Builder- Parameters:
relations- the relations between document types- Returns:
- the builder
-
build
Description copied from interface:IndexSchema.BuilderBuilds the schema- Specified by:
buildin interfaceIndexSchema.Builder- Returns:
- the schema
-