You are here

public function SolrFieldType::getSpellcheckFieldTypeAsXml in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x src/Entity/SolrFieldType.php \Drupal\search_api_solr\Entity\SolrFieldType::getSpellcheckFieldTypeAsXml()

Gets the Solr Spellcheck Spellcheck Field Type definition as XML fragment.

The XML format is used as part of a classic Solr schema.

Parameters

bool $add_comment: Wether to add a comment to the XML or not to explain the purpose of this Solr Field Type.

Return value

string The Solr Spellcheck Field Type definition as XML, might be empty if it doesn't exist.

Overrides SolrFieldTypeInterface::getSpellcheckFieldTypeAsXml

File

src/Entity/SolrFieldType.php, line 369

Class

SolrFieldType
Defines the SolrFieldType entity.

Namespace

Drupal\search_api_solr\Entity

Code

public function getSpellcheckFieldTypeAsXml($add_comment = TRUE) {
  return $this->spellcheck_field_type ? $this
    ->getSubFieldTypeAsXml($this->spellcheck_field_type, ' spellcheck') : '';
}