]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1380407 - Make elasticsearch ircnick checks consider numbers to be valid too
authorDylan William Hardison <dylan@hardison.net>
Thu, 13 Jul 2017 23:28:57 +0000 (19:28 -0400)
committerGitHub <noreply@github.com>
Thu, 13 Jul 2017 23:28:57 +0000 (19:28 -0400)
Bugzilla/Elastic/Indexer.pm
Bugzilla/User.pm

index 35c9bb119052f704703b4396e010b85110506004..ab6c5dbfaa528cb1284dd802420bd3a993747a11 100644 (file)
@@ -45,6 +45,11 @@ sub create_index {
                         },
                     },
                     analyzer => {
+                        autocomplete => {
+                            type      => 'custom',
+                            tokenizer => 'keyword',
+                            filter    => ['lowercase', 'asciifolding_original'],
+                        },
                         folding => {
                             tokenizer => 'standard',
                             filter    => ['standard', 'lowercase', 'asciifolding_original'],
index e7a5ed481a4f79f55ef810c94da4cb8f6cf3a7c0..a3a78395af92f45e419f0e8f7fa2b8de41f2b0a2 100644 (file)
@@ -163,8 +163,7 @@ sub ES_PROPERTIES {
         },
         suggest_nick => {
             type            => 'completion',
-            analyzer        => 'simple',
-            search_analyzer => 'simple',
+            analyzer        => 'autocomplete',
             payloads        => \1,
         },
         login      => { type => 'string' },