You are here

public function DoubleQuoteWorkaround::decodeStreamingExpressionValue in Search API Solr 8.3

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

Decodes a streaming expression value.

Parameters

string $value: The string to be decoded.

Return value

string|null The decoded string.

Overrides SolrProcessorInterface::decodeStreamingExpressionValue

1 call to DoubleQuoteWorkaround::decodeStreamingExpressionValue()
DoubleQuoteWorkaround::postprocessSearchResults in src/Plugin/search_api/processor/DoubleQuoteWorkaround.php
Postprocess search results before they are returned by the query.

File

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

Class

DoubleQuoteWorkaround
Replaces double quotes in field values and query.

Namespace

Drupal\search_api_solr\Plugin\search_api\processor

Code

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