Allow special characters (Analyzer?) in NEST 5.3.0

Hello.

I've been struggling with this for over a day so I figured it was time to ask for help.
I'm using NEST C# and want to allow special characters to be searchable.
Numbers seem to be searchable but don't appear in my autoComplete dropdown.

This is my index function.

     var node = new Uri("http://localhost:9200");
            var libraryIndex = "library";
            var connectionSettings = new ConnectionSettings(node);
            connectionSettings.DefaultIndex(libraryIndex);
            
            var client = new ElasticClient(connectionSettings);

            CustomAnalyzer allowSpecialCharacters = new CustomAnalyzer
            {
                Tokenizer = "whitespace",
                Filter = new List<string>()
                {
                    "lowercase"
                }
            };

            if (!client.IndexExists(libraryIndex).Exists)
            {
                var createIndexResponse = client.CreateIndex(libraryIndex, c => c
                  .Settings(s => s.Analysis(a => a.Analyzers(an => an.UserDefined("allowSpecialCharacters", allowSpecialCharacters))))
                    .Mappings(m => m
                        .Map<Lesson>(ll => ll.AllField(af => af.Analyzer("allowSpecialCharacters")).AutoMap())
                        .Map<Chapter>(cc => cc.AllField(af => af.Analyzer("allowSpecialCharacters")).AutoMap())
                        .Map<Book>(bb => bb.AllField(af => af.Analyzer("allowSpecialCharacters")).AutoMap())
                    )
                );
                if (!createIndexResponse.IsValid)
                    Console.WriteLine(createIndexResponse.DebugInformation);
            }

Any help would be much appreciated. I've tried countless things.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.