interface SolrFieldDefinitionInterface in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 src/TypedData/SolrFieldDefinitionInterface.php \Drupal\search_api_solr\TypedData\SolrFieldDefinitionInterface
- 4.x src/TypedData/SolrFieldDefinitionInterface.php \Drupal\search_api_solr\TypedData\SolrFieldDefinitionInterface
Defines an interface for Solr field definitions.
The methods in this interface were copied from the Sarnia 7.x module's SarniaSearchApiSolrField class. It is possible that not all of these methods are necessary or will be used. They were copied because isMultivalued() provides a convenient way to implement DataDefinitionInterface::isList(). The rest of the methods were also included just in case they are needed for other purposes.
@todo Remove unused methods before the official release.
Hierarchy
- interface \Drupal\Core\TypedData\DataDefinitionInterface
- interface \Drupal\search_api_solr\TypedData\SolrFieldDefinitionInterface
Expanded class hierarchy of SolrFieldDefinitionInterface
All classes that implement SolrFieldDefinitionInterface
File
- src/
TypedData/ SolrFieldDefinitionInterface.php, line 19
Namespace
Drupal\search_api_solr\TypedDataView source
interface SolrFieldDefinitionInterface extends DataDefinitionInterface {
/**
* Gets an array of field properties.
*
* @return string[]
* An array of properties describing the solr schema. The array keys are
* single-character codes, and the values are human-readable labels.
*/
public function getSchema();
/**
* Gets the "dynamic base" of this field.
*
* This typically looks like 'ss_*, and is used to aggregate fields based on
* "hungarian" naming conventions.
*
* @return string
* The mask describing the solr aggregate field, if there is one.
*/
public function getDynamicBase();
/**
* Determines whether this field is indexed.
*
* @return bool
* TRUE if the field is indexed, FALSE otherwise.
*/
public function isIndexed();
/**
* Determines whether this field is tokenized.
*
* @return bool
* TRUE if the field is tokenized, FALSE otherwise.
*/
public function isTokenized();
/**
* Determines whether this field is stored.
*
* @return bool
* TRUE if the field is stored, FALSE otherwise.
*/
public function isStored();
/**
* Determines whether this field is multi-valued.
*
* @return bool
* TRUE if the field is multi-valued, FALSE otherwise.
*/
public function isMultivalued();
/**
* Determines whether this field has stored term vectors.
*
* @return bool
* TRUE if the field has stored term vectors, FALSE otherwise.
*/
public function isTermVectorStored();
/**
* Determines whether this field has the "termOffsets" option set.
*
* @return bool
* TRUE if the field has the "termOffsets" option set, FALSE otherwise.
*/
public function isStoreOffsetWithTermVector();
/**
* Determines whether this field has the "termPositions" option set.
*
* @return bool
* TRUE if the field has the "termPositions" option set, FALSE otherwise.
*/
public function isStorePositionWithTermVector();
/**
* Determines whether this field omits norms when indexing.
*
* @return bool
* TRUE if the field omits norms, FALSE otherwise.
*/
public function isOmitNorms();
/**
* Determines whether this field is lazy-loaded.
*
* @return bool
* TRUE if the field is lazy-loaded, FALSE otherwise.
*/
public function isLazy();
/**
* Determines whether this field is binary.
*
* @return bool
* TRUE if the field is binary, FALSE otherwise.
*/
public function isBinary();
/**
* Determines whether this field is compressed.
*
* @return bool
* TRUE if the field is compressed, FALSE otherwise.
*/
public function isCompressed();
/**
* Determines whether this field sorts missing entries first.
*
* @return bool
* TRUE if the field sorts missing entries first, FALSE otherwise.
*/
public function isSortMissingFirst();
/**
* Determines whether this field sorts missing entries last.
*
* @return bool
* TRUE if the field sorts missing entries last, FALSE otherwise.
*/
public function isSortMissingLast();
/**
* Determine whether this field may be suitable for use as a key field.
*
* Unfortunately, it seems like the best way to find an actual uniqueKey field
* according to Solr is to examine the Solr core's schema.xml.
*
* @return bool
* Whether the field is suitable for use as a key.
*/
public function isPossibleKey();
/**
* Determine whether a field is suitable for sorting.
*
* In order for a field to yield useful sorted results in Solr, it must be
* indexed and not multivalued. If a sort field is tokenized, the tokenization
* must yield only one token; multiple tokens can result in unpredictable sort
* ordering. Unfortunately, there's no way to check whether a particular field
* contains values with multiple tokens.
*
* @return bool
* Whether the field might be suitable for sorting.
*/
public function isSortable();
/**
* Determine whether a field is suitable for fulltext search.
*
* Some fields are tokenized for sort and contain a single, all lowercase
* value. These fields are not suitable for fulltext search, but there is no
* general way to tell them apart from fields that are tokenized into multiple
* terms.
*
* @return bool
* Whether the field might be suitable for fulltext search.
*/
public function isFulltextSearchable();
/**
* Determine whether a field is suitable for filtering.
*
* Fields suitable for filtering must be non-fulltext. A case-sensitive is
* used. When searching on this type of field, only full, exact values will
* match.
*
* @return bool
* Whether the field might be suitable for filtering.
*/
public function isFilterable();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataDefinitionInterface:: |
public | function | Adds a validation constraint. | 2 |
DataDefinitionInterface:: |
public static | function | Creates a new data definition object. | 2 |
DataDefinitionInterface:: |
public | function | Returns the class used for creating the typed data object. | 2 |
DataDefinitionInterface:: |
public | function | Returns a validation constraint. | 2 |
DataDefinitionInterface:: |
public | function | Returns an array of validation constraints. | 2 |
DataDefinitionInterface:: |
public | function | Returns the data type of the data. | 2 |
DataDefinitionInterface:: |
public | function | Returns a human readable description. | 2 |
DataDefinitionInterface:: |
public | function | Returns a human readable label. | 2 |
DataDefinitionInterface:: |
public | function | Returns the value of a given setting. | 2 |
DataDefinitionInterface:: |
public | function | Returns the array of settings, as required by the used class. | 2 |
DataDefinitionInterface:: |
public | function | Determines whether the data value is computed. | 3 |
DataDefinitionInterface:: |
public | function | Determines whether the data value is internal. | 2 |
DataDefinitionInterface:: |
public | function | Returns whether the data is multi-valued, i.e. a list of data items. | 2 |
DataDefinitionInterface:: |
public | function | Determines whether the data is read-only. | 3 |
DataDefinitionInterface:: |
public | function | Determines whether a data value is required. | 2 |
SolrFieldDefinitionInterface:: |
public | function | Gets the "dynamic base" of this field. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Gets an array of field properties. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is binary. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is compressed. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determine whether a field is suitable for filtering. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determine whether a field is suitable for fulltext search. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is indexed. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is lazy-loaded. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is multi-valued. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field omits norms when indexing. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determine whether this field may be suitable for use as a key field. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determine whether a field is suitable for sorting. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field sorts missing entries first. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field sorts missing entries last. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is stored. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field has the "termOffsets" option set. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field has the "termPositions" option set. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field has stored term vectors. | 1 |
SolrFieldDefinitionInterface:: |
public | function | Determines whether this field is tokenized. | 1 |