nuvoleweb / search_api_spellcheck

Search api suggestions area for Drupal 8 views
2 stars 10 forks source link

Check if suggestions are empty and skip if they are. #1

Open damontgomery opened 7 years ago

damontgomery commented 7 years ago

Applicable for Solr search.

For some reason, when using this module with search_api_solr and search_api_solr_multilingual, if you search for a term that doesn't return any results and doesn't return any suggestions, an error is produced.

Has to do with getFilterMatch() and $suggestion[0]. This fix checks if the suggestion is empty and continues if it is.

pescetti commented 7 years ago

Thank you! Can we integrate your patch under the GPLv2 (the Drupal license)? I assume this is a "yes", but since we are not on the drupal.org infrastructure it's better to ask.