You are here

protected function Stopwords::testType in Search API 8

Determines whether a field of a certain type should be preprocessed.

The default implementation returns TRUE for "text" and "string".

Parameters

string $type: The type of the field (either when preprocessing the field at index time, or a condition on the field at query time).

Return value

bool TRUE if fields of that type should be processed, FALSE otherwise.

Overrides FieldsProcessorPluginBase::testType

File

src/Plugin/search_api/processor/Stopwords.php, line 120

Class

Stopwords
Allows you to define stopwords which will be ignored in searches.

Namespace

Drupal\search_api\Plugin\search_api\processor

Code

protected function testType($type) {
  return $this
    ->getDataTypeHelper()
    ->isTextType($type);
}