You are here

SearchApiElasticsearchSpellcheck.inc in Search API Elasticsearch 7

Contains SearchApiElasticsearchSpellcheck

File

includes/SearchApiElasticsearchSpellcheck.inc
View source
<?php

/**
 * @file
 * Contains SearchApiElasticsearchSpellcheck
 */
class SearchApiElasticsearchSpellcheck extends SearchApiSpellcheck {

  /**
   * __construct
   *
   * @param mixed $data
   * @access public
   * @return void
   */
  public function __construct($data) {
    foreach ($data['suggestions'] as $suggestion) {
      $this
        ->addSuggestion(new SearchApiSpellcheckSuggestion($data['text'], $suggestion));
    }
  }

}

Classes

Namesort descending Description
SearchApiElasticsearchSpellcheck @file Contains SearchApiElasticsearchSpellcheck