You are here

public static function Utility::formatCheckpointId in Search API Solr 4.x

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

Formats a checkpoint ID for topic() or _topic() streaming expressions.

The checkpoint name gets suffixed by targeted index and site hash to avoid collisions.

Parameters

string $checkpoint:

string $index_id:

string $site_hash:

Return value

string The formatted checkpoint ID.

2 calls to Utility::formatCheckpointId()
StandardSolrCloudConnector::deleteCheckpoints in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Deletes all checkpoints for given index/site.
StreamingExpressionBuilder::_checkpoint in src/Utility/StreamingExpressionBuilder.php
Formats a checkpoint parameter for topic() or _topic().

File

src/Utility/Utility.php, line 1099

Class

Utility
Provides various helper functions for Solr backends.

Namespace

Drupal\search_api_solr\Utility

Code

public static function formatCheckpointId(string $checkpoint, string $index_id, string $site_hash) : string {
  return $checkpoint . '-' . $index_id . '-' . $site_hash;
}