search api autocomplete withour accent, and splitting numbers (fruhstuck40)
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- search_api_solr
|
||||
id: text_edgestring_ascii_und_6_0_0
|
||||
label: 'Edge NGram ASCII String Field'
|
||||
minimum_solr_version: 6.0.0
|
||||
custom_code: 'edgeasciistring'
|
||||
field_type_language_code: und
|
||||
domains: {}
|
||||
field_type:
|
||||
name: text_edgenasciistring
|
||||
class: solr.TextField
|
||||
positionIncrementGap: 100
|
||||
analyzers:
|
||||
-
|
||||
type: index
|
||||
tokenizer:
|
||||
class: solr.StandardTokenizerFactory
|
||||
filters:
|
||||
-
|
||||
class: solr.LowerCaseFilterFactory
|
||||
-
|
||||
class: solr.RemoveDuplicatesTokenFilterFactory
|
||||
-
|
||||
class: solr.EdgeNGramFilterFactory
|
||||
minGramSize: 2
|
||||
maxGramSize: 25
|
||||
-
|
||||
class: solr.ASCIIFoldingFilterFactory
|
||||
preserveOriginal: true
|
||||
-
|
||||
class: solr.WordDelimiterGraphFilterFactory
|
||||
preserveOriginal: 1
|
||||
-
|
||||
type: query
|
||||
tokenizer:
|
||||
class: solr.StandardTokenizerFactory
|
||||
filters:
|
||||
-
|
||||
class: solr.LowerCaseFilterFactory
|
||||
-
|
||||
class: solr.RemoveDuplicatesTokenFilterFactory
|
||||
-
|
||||
class: solr.ASCIIFoldingFilterFactory
|
||||
preserveOriginal: true
|
||||
-
|
||||
class: solr.WordDelimiterGraphFilterFactory
|
||||
preserveOriginal: 1
|
||||
solr_configs: {}
|
||||
text_files: {}
|
@@ -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