You are here

function fuzzysearch_get_index_options in Fuzzy Search 7

Fuzzy search get index options.

2 calls to fuzzysearch_get_index_options()
FuzzySearchService::search in includes/service.inc
Executes a search on the server represented by this object.
fuzzysearch_build_excerpt in ./fuzzysearch.module
Fuzzysearch build excerpt.

File

./fuzzysearch.module, line 194
Fuzzysearch module.

Code

function fuzzysearch_get_index_options($index) {
  return array(
    'nlength' => isset($index->options['processors']['fuzzysearch_search']) ? $index->options['processors']['fuzzysearch_search']['settings']['ngram_length'] : NULL,
    'missing_letters' => isset($index->options['processors']['fuzzysearch_search']) ? $index->options['processors']['fuzzysearch_search']['settings']['missing_letters'] : NULL,
    'extra_letters' => isset($index->options['processors']['fuzzysearch_search']) ? $index->options['processors']['fuzzysearch_search']['settings']['extra_letters'] : NULL,
    'min_completeness' => isset($index->options['processors']['fuzzysearch_search']) ? $index->options['processors']['fuzzysearch_search']['settings']['completeness'] : NULL,
    'sort_score' => isset($index->options['processors']['fuzzysearch_search']) ? $index->options['processors']['fuzzysearch_search']['settings']['sort_score'] : NULL,
  );
}