You are here

public function StreamingExpressionBuilder::_update in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Utility/StreamingExpressionBuilder.php \Drupal\search_api_solr\Utility\StreamingExpressionBuilder::_update()
  2. 8.2 src/Utility/StreamingExpressionBuilder.php \Drupal\search_api_solr\Utility\StreamingExpressionBuilder::_update()

Applies the update decorator to the incoming stream.

Parameters

string $stream: The stream value.

array $options: The option keys are the ones from the Solr documentation, prefixed with "update.".

Return value

string A chainable streaming expression as string.

See also

https://lucene.apache.org/solr/guide/7_3/stream-decorator-reference.html...

1 call to StreamingExpressionBuilder::_update()
StreamingExpressionBuilder::_commit_update in src/Utility/StreamingExpressionBuilder.php
A shorthand for _update() and _commit().

File

src/Utility/StreamingExpressionBuilder.php, line 598

Class

StreamingExpressionBuilder
Provides methods for creating streaming expressions targeting a given index.

Namespace

Drupal\search_api_solr\Utility

Code

public function _update(string $stream, array $options = []) {
  $options += [
    'update.batchSize' => 500,
  ];
  return $this
    ->update($this
    ->_collection(), 'batchSize=' . $options['update.batchSize'], $stream);
}