# Disable Date detection for fields / index using nest

**URL:** <https://discuss.elastic.co/t/disable-date-detection-for-fields-index-using-nest/72047>\
**Category:** Elasticsearch\
**Created:** [January 18, 2017, 4:11pm UTC](https://discuss.elastic.co/t/disable-date-detection-for-fields-index-using-nest/72047 "2017-01-18T16:11:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dror\_Shahak](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@Dror\_Shahak](https://discuss.elastic.co/u/Dror_Shahak)\
**Post date:** [January 18, 2017, 4:11pm UTC](https://discuss.elastic.co/t/disable-date-detection-for-fields-index-using-nest/72047/1 "2017-01-18T16:11:50Z")

</div>

Hi,  
I'm indexing strings and am getting the date strings detected and re-formatted against my will.  
How would i efine it against the NEST client?

below is the way I map the fields to my \> NestedObjectMappingDescriptor

```
        selector.Properties(props1 => props1
                .String(smd => smd.Name(par => par.Id).Index(FieldIndexOption.NotAnalyzed))
                .String(smd => smd.Name(par => par.Text).Index(FieldIndexOption.Analyzed).IndexAnalyzer(ElasticSearchWrapper.StandardAnalyzer))
                .String(smd => smd.Name(par => par.ContentType).Index(FieldIndexOption.NotAnalyzed)));

```

If this is not possible, I might be inclined to define this for the entire index, How would I do that in NEST?

here is my index creation:

CreateIndexDescriptor result = indexDescriptor

```
                              .Analysis(c => c
                                  .Tokenizers((a) => new FluentDictionary<string, TokenizerBase> { { tokenizerName, nGramTokenizer } })
                                 .Analyzers(d => d.Add(NGramAnalyzer, customAnalyzer)
                                                  .Add(StandardAnalyzer, new StandardAnalyzer())
                                                  .Add(CaseInsensitiveSortAnalyzer, caseInsensitiveSortAnalyzer)))

```

And lastly, can I define this in a config file (yml) for elastic?

Thanks in Advance,  
Dror

---

<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:** [February 15, 2017, 4:12pm UTC](https://discuss.elastic.co/t/disable-date-detection-for-fields-index-using-nest/72047/2 "2017-02-15T16:12:19Z")

</div>

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