# Allow special characters (Analyzer?) in NEST 5.3.0

**URL:** <https://discuss.elastic.co/t/allow-special-characters-analyzer-in-nest-5-3-0/81958>\
**Category:** Elasticsearch\
**Created:** [April 11, 2017, 10:37am UTC](https://discuss.elastic.co/t/allow-special-characters-analyzer-in-nest-5-3-0/81958 "2017-04-11T10:37:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelsaunders93](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@michaelsaunders93](https://discuss.elastic.co/u/michaelsaunders93)\
**Post date:** [April 11, 2017, 10:37am UTC](https://discuss.elastic.co/t/allow-special-characters-analyzer-in-nest-5-3-0/81958/1 "2017-04-11T10:37:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 9, 2017, 10:50am UTC](https://discuss.elastic.co/t/allow-special-characters-analyzer-in-nest-5-3-0/81958/2 "2017-05-09T10:50:46Z")

</div>

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