public function StreamingExpressionBuilder::_select_renamed_field in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/Utility/StreamingExpressionBuilder.php \Drupal\search_api_solr\Utility\StreamingExpressionBuilder::_select_renamed_field()
- 8.2 src/Utility/StreamingExpressionBuilder.php \Drupal\search_api_solr\Utility\StreamingExpressionBuilder::_select_renamed_field()
Rename a field within select().
Parameters
string $search_api_field_name_source: The Search API field name to rename.
string $search_api_field_name_target: The target field name.
string $language_id: (optional) The language ID. Defaults to "und".
Return value
string The expression as string.
File
- src/
Utility/ StreamingExpressionBuilder.php, line 445
Class
- StreamingExpressionBuilder
- Provides methods for creating streaming expressions targeting a given index.
Namespace
Drupal\search_api_solr\UtilityCode
public function _select_renamed_field(string $search_api_field_name_source, string $search_api_field_name_target, string $language_id = LanguageInterface::LANGCODE_NOT_SPECIFIED) {
return $this
->_field($search_api_field_name_source, $language_id) . ' as ' . $this
->_field($search_api_field_name_target, $language_id);
}