You are here

public function DoubleQuoteWorkaround::encodeStreamingExpressionValue in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/DoubleQuoteWorkaround.php \Drupal\search_api_solr\Plugin\search_api\processor\DoubleQuoteWorkaround::encodeStreamingExpressionValue()
  2. 8.2 src/Plugin/search_api/processor/DoubleQuoteWorkaround.php \Drupal\search_api_solr\Plugin\search_api\processor\DoubleQuoteWorkaround::encodeStreamingExpressionValue()

Encodes a streaming expression value.

Parameters

string $value: The string to be encoded.

Return value

string|null The encoded string.

Overrides SolrProcessorInterface::encodeStreamingExpressionValue

File

src/Plugin/search_api/processor/DoubleQuoteWorkaround.php, line 107

Class

DoubleQuoteWorkaround
Replaces double quotes in field values and query.

Namespace

Drupal\search_api_solr\Plugin\search_api\processor

Code

public function encodeStreamingExpressionValue(string $value) {
  return preg_replace('/"/u', $this->configuration['replacement'], $value);
}