SilverStripe Search

SchemaFactory extends ViewableData
in package
Uses GetSetSchemaFactoryTrait

Class SchemaFactory

Table of Contents

Properties

$baseTemplatePath  : array<string|int, mixed>
$coreService  : SolrCoreService
$fieldResolver  : FieldResolver
$index  : BaseIndex
Index to generate the schema for
$store  : bool
Store the value in Solr
$storeFields  : array<string|int, mixed>
$template  : string
ABSOLUTE Path to template
$typesTemplate  : string
ABSOLUTE Path to types.ss template

Methods

__construct()  : mixed
SchemaFactory constructor.
generateSchema()  : DBHTMLText
Generate the Schema xml
getBaseTemplatePath()  : string|bool
Retrieve the base template path for a type (extra or schema)
getClassID()  : string
Get the Identifier Field for Solr
getCopyFieldDefinitions()  : ArrayList
Get the definition of a copy field for determining what to load in to Solr
getCopyFields()  : ArrayList
Get the fields that should be copied
getDefaultField()  : string|array<string|int, mixed>
Get the default field to generate df components for
getExtrasPath()  : string
Get any the template path for anything that needs loading in to Solr
getFilterFieldDefinitions()  : ArrayList
Get the definitions of a filter field to load in to Solr.
getFulltextFieldDefinitions()  : ArrayList
Get all fulltext field definitions that are loaded
getIDField()  : string
Get the Identifier Field for Solr
getIndex()  : BaseIndex
Get the Index that's being used
getIndexName()  : string
Get the name of the index being used
getTemplate()  : string
Get the base template for the schema xml
getTemplatePathFor()  : string
Get the base path of the template given, e.g. the "schema" templates or the "extra" templates.
getTypes()  : DBHTMLText
Get the types template in a rendered state
getTypesTemplate()  : string
Get the types template if defined
setBaseTemplatePath()  : SchemaFactory
Set the base template path for a type (extra or schema)
setIndex()  : SchemaFactory
Set the index that's being used and add the introspection for it
setStore()  : void
Set the store value
setTemplate()  : SchemaFactory
Set a custom template for schema xml
setTypesTemplate()  : SchemaFactory
Set custom types template
getFieldDefinition()  : mixed
Get the field definition for a single field
getStoreFields()  : array<string|int, mixed>
Get the stored fields. This includes boosted and faceted fields

Properties

$baseTemplatePath

protected array<string|int, mixed> $baseTemplatePath

Base paths to the template

$storeFields

protected static array<string|int, mixed> $storeFields = []

Fields that always need to be stored, by Index name

Methods

__construct()

SchemaFactory constructor.

public __construct() : mixed

generateSchema()

Generate the Schema xml

public generateSchema() : DBHTMLText
Return values
DBHTMLText

getBaseTemplatePath()

Retrieve the base template path for a type (extra or schema)

public getBaseTemplatePath( $type) : string|bool
Parameters
$type :
Return values
string|bool

getCopyFieldDefinitions()

Get the definition of a copy field for determining what to load in to Solr

public getCopyFieldDefinitions() : ArrayList
Tags
throws
Exception
Return values
ArrayList

getCopyFields()

Get the fields that should be copied

public getCopyFields() : ArrayList
Return values
ArrayList

getDefaultField()

Get the default field to generate df components for

public getDefaultField() : string|array<string|int, mixed>
Return values
string|array<string|int, mixed>

getExtrasPath()

Get any the template path for anything that needs loading in to Solr

public getExtrasPath() : string
Return values
string

getFilterFieldDefinitions()

Get the definitions of a filter field to load in to Solr.

public getFilterFieldDefinitions() : ArrayList
Tags
throws
Exception
Return values
ArrayList

getFulltextFieldDefinitions()

Get all fulltext field definitions that are loaded

public getFulltextFieldDefinitions() : ArrayList
Tags
throws
Exception
Return values
ArrayList

getTemplate()

Get the base template for the schema xml

public getTemplate() : string
Return values
string

getTemplatePathFor()

Get the base path of the template given, e.g. the "schema" templates or the "extra" templates.

public getTemplatePathFor(string $type) : string
Parameters
$type : string

What type of templates do we need to get

Return values
string

getTypes()

Get the types template in a rendered state

public getTypes() : DBHTMLText
Return values
DBHTMLText

getTypesTemplate()

Get the types template if defined

public getTypesTemplate() : string
Return values
string

setBaseTemplatePath()

Set the base template path for a type (extra or schema)

public setBaseTemplatePath(string $baseTemplatePath, string $type) : SchemaFactory
Parameters
$baseTemplatePath : string
$type : string
Return values
SchemaFactory

getFieldDefinition()

Get the field definition for a single field

protected getFieldDefinition( $fieldName, ArrayList &$return[, null|string $copyField = null ]) : mixed
Parameters
$fieldName :
$return : ArrayList
$copyField : null|string = null
Tags
throws
Exception

getStoreFields()

Get the stored fields. This includes boosted and faceted fields

protected getStoreFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results