tests\mocks\TestIndexFour
Synopsis
class TestIndexFour
extends BaseIndex
implements
TestOnly
{
- // Inherited members from BaseIndex
- protected SchemaFactory $schemaFactory;
- protected QueryComponentFactory $queryFactory;
- protected array $queryTerms;
- protected Query $clientQuery;
- // methods
- public void getIndexName()
- // Inherited methods from BaseIndex
- public void __construct()
- public array getConfig()
- public abstract string getIndexName()
- public void init()
- protected void initFromConfig()
- public SearchResult|ArrayData|mixed doSearch()
- public Query buildSolrQuery()
- protected QueryComponentFactory|mixed buildFactory()
- protected bool doRetry()
- protected SearchResult|mixed|ArrayData spellcheckRetry()
- public array getFieldsForIndexing()
- public void uploadConfig()
- public string getSynonyms()
- public array getQueryTerms()
- public QueryComponentFactory getQueryFactory()
- public Query getClientQuery()
- public bool isRetry()
- // Inherited methods from GetterSetterTrait
- public $this setClasses()
- public array getClasses()
- public $this addClass()
- public $this addBoostedField()
- public array getBoostedFields()
- public $this setBoostedFields()
- public array getFacetFields()
- public $this setFacetFields()
- // Inherited methods from BaseIndexTrait
- public array getCopyFields()
- public $this setCopyFields()
- public string getDefaultField()
- public $this setDefaultField()
- public $this addSortField()
- public array getFulltextFields()
- public $this setFulltextFields()
- public array getFilterFields()
- public $this setFilterFields()
- public $this addFulltextField()
- public abstract mixed addBoostedField()
- public array getSortFields()
- public $this setSortFields()
- public void addAllFulltextFields()
- protected void addAllFieldsByType()
- public abstract array getClasses()
- protected void addFulltextFieldsForClass()
- public void addAllDateFields()
- public $this addFacetField()
- public $this addFilterField()
- public $this addCopyField()
- public BaseIndex addStoredField()
- public Client getClient()
- public $this setClient()
- public array getStoredFields()
- public BaseIndex setStoredFields()
Hierarchy
Tasks
Line | Task |
---|---|
364 | use types/schema/elevate rendering |
Members
protected
- $boostedFields
—
array
Sets boosting at _index_ time or _query_ time. Depending on the usage of this trait [ 'FieldName' => 2, ] - $class — array
- $client — Solarium\Core\Client\Client
- $clientQuery — Solarium\QueryType\Select\Query\Query
- $copyFields — array
- $defaultField — string
- $facetFields
—
array
Format: SiteTree::class => [ 'BaseClass' => SiteTree::class, 'Field' => 'ChannelID', 'Title' => 'Channel' ], Object::class => [ 'BaseClass' => Object::class, 'Field' => 'Relation.ID', 'Title' => 'Relation' ], - $facetFields — array
- $filterFields — array
- $fulltextFields — array
- $queryFactory
—
Firesphere\SolrSearch\Factories\QueryComponentFactory
{@link QueryComponentFactory} - $queryTerms — array
- $schemaFactory
—
Firesphere\SolrSearch\Factories\SchemaFactory
{@link SchemaFactory} - $sortFields — array
- $storedFields — array
- $usedAllFields
—
Firesphere\SolrSearch\Traits\bool
usedAllFields is used to determine if the addAllFields method has been called This is to prevent a notice if there is no yml.
Methods
public
Inherited from Firesphere\SolrSearch\Indexes\BaseIndex
protected
- buildFactory() — Build a factory to use in the SolrQuery building. {@link static::buildSolrQuery()}
- doRetry() — Check if the query should be retried with spellchecking Conditions are: It is not already a retry with spellchecking Spellchecking is enabled If spellchecking is enabled and nothing is found OR it should follow spellchecking none the less There is a spellcheck output
- initFromConfig() — Generate the config from yml if possible
- spellcheckRetry() — Retry the query with the first collated spellcheck found.
public
- buildSolrQuery() — From the given BaseQuery, generate a Solarium ClientQuery object
- doSearch() — Default returns a SearchResult. It can return an ArrayData if FTS Compat is enabled
- getClientQuery() — Retrieve the Solarium client Query object for this index operation
- getConfig() — Build a full config for all given endpoints This is to add the current index to e.g. an index or select
- getFieldsForIndexing() — Get all fields that are required for indexing in a unique way
- getIndexName() — Name of this index.
- getQueryFactory() — Get the QueryComponentFactory. {@link QueryComponentFactory}
- getQueryTerms() — Get the final, generated terms
- getSynonyms() — Add synonyms. Public to be extendable
- init() — Required to initialise the fields.
- isRetry()
- uploadConfig() — Upload config for this index to the given store
Inherited from Firesphere\SolrSearch\Traits\GetterSetterTrait
public
- addBoostedField() — Add a boosted field to be boosted at query time
- addClass() — Add a class to index or query $options is not used anymore, added for backward compatibility
- getBoostedFields() — Get the boosted fields
- getClasses() — Get classes
- getFacetFields() — Get the facet fields
- setBoostedFields() — Boosted fields are used at index time, not at query time
- setClasses() — Set the classes
- setFacetFields() — Set the facet fields
Inherited from Firesphere\SolrSearch\Traits\BaseIndexTrait
protected
- addAllFieldsByType() — Add all database-backed text fields as fulltext searchable fields.
- addFulltextFieldsForClass() — Add all fields of a given type to the index
public
- addAllDateFields() — Add all date-type fields to the given index
- addAllFulltextFields() — Add all text-type fields to the given index
- addBoostedField() — Add an abstract for the add Boosted Field to keep things consistent
- addCopyField() — Add a copy field
- addFacetField() — Add a facet field
- addFilterField() — Add a filterable field
- addFulltextField() — Add a single Fulltext field
- addSortField() — Add a field to sort on
- addStoredField() — Add a stored/fulltext field
- getClasses() — This trait requires classes to be set, so getClasses can be called.
- getClient() — Get the client
- getCopyFields() — Return the copy fields
- getDefaultField() — Return the default field for this index
- getFilterFields() — Get the filter fields
- getFulltextFields() — Get the fulltext fields
- getSortFields() — Get the sortable fields
- getStoredFields() — Get the stored field list
- setClient() — Set/override the client
- setCopyFields() — Set the copy fields
- setDefaultField() — Set the default field for this index
- setFilterFields() — Set the filter fields
- setFulltextFields() — Set the fulltext fields
- setSortFields() — Set/override the sortable fields
- setStoredFields() — Set/override the stored field list