search api autocomplete withour accent, and splitting numbers (fruhstuck40)
This commit is contained in:
@@ -8,7 +8,7 @@ use Drupal\Core\Controller\ControllerBase;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Drupal\Component\Utility\Tags;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
// use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\search_api\Entity\Index;
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ class FormAutocomplete extends ControllerBase {
|
||||
// Get the typed string from the URL, if it exists.
|
||||
if ($input = $request->query->get('q')) {
|
||||
$typed_string = Tags::explode($input);
|
||||
$typed_string = Unicode::strtolower(array_pop($typed_string));
|
||||
// $typed_string = Unicode::strtolower(array_pop($typed_string));
|
||||
$typed_string = mb_strtolower(array_pop($typed_string));
|
||||
// \Drupal::logger('materio_sapi')->notice($typed_string);
|
||||
|
||||
$index = Index::load('autocomplete');
|
||||
|
Reference in New Issue
Block a user