You are here

public function Server::getDiscouragedProcessors in Search API 8

Limits the processors displayed in the UI for indexes on this server.

Returns an array of processor IDs that should not be enabled for this backend. It is a bad idea, for example, to have the "Tokenizer" processor enabled when using a Solr backend.

Return value

string[] A list of processor IDs.

Overrides BackendSpecificInterface::getDiscouragedProcessors

File

src/Entity/Server.php, line 241

Class

Server
Defines the search server configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function getDiscouragedProcessors() {
  if ($this
    ->hasValidBackend()) {
    return $this
      ->getBackend()
      ->getDiscouragedProcessors();
  }
  return [];
}