You are here

public function SearchApiQuery::setFulltextFields in Search API 8

Sets the fields that will be searched for the search keys.

If this is not called, all fulltext fields will be searched.

Parameters

array $fields: An array containing fulltext fields that should be searched.

Return value

$this

See also

\Drupal\search_api\Query\QueryInterface::setFulltextFields()

File

src/Plugin/views/query/SearchApiQuery.php, line 969

Class

SearchApiQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\search_api\Plugin\views\query

Code

public function setFulltextFields(array $fields = NULL) {
  if (!$this
    ->shouldAbort()) {
    $this->query
      ->setFulltextFields($fields);
  }
  return $this;
}