You are here

public function IndexInterface::removeField in Search API 8

Removes a field from the index.

If the field doesn't exist, the call will fail silently.

Parameters

string $field_id: The ID of the field to remove.

Return value

$this

Throws

\Drupal\search_api\SearchApiException Thrown if the field is locked.

2 methods override IndexInterface::removeField()
Index::removeField in src/Entity/Index.php
Removes a field from the index.
UnsavedIndexConfiguration::removeField in src/UnsavedIndexConfiguration.php
Removes a field from the index.

File

src/IndexInterface.php, line 458

Class

IndexInterface
Defines the interface for index entities.

Namespace

Drupal\search_api

Code

public function removeField($field_id);