# Mapping for text and date field that should be null-able and sort-able

**URL:** <https://discuss.elastic.co/t/mapping-for-text-and-date-field-that-should-be-null-able-and-sort-able/126932>\
**Category:** Elasticsearch\
**Created:** [April 5, 2018, 1:01pm UTC](https://discuss.elastic.co/t/mapping-for-text-and-date-field-that-should-be-null-able-and-sort-able/126932 "2018-04-05T13:01:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmathur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nmathur/32/21451_2.png) [@nmathur](https://discuss.elastic.co/u/nmathur)\
**Post date:** [April 5, 2018, 1:01pm UTC](https://discuss.elastic.co/t/mapping-for-text-and-date-field-that-should-be-null-able-and-sort-able/126932/1 "2018-04-05T13:01:20Z")

</div>

Hello All,

I have some very important allow null fields in my database .. few are text fields and few date fields.... I am facing issue with elasticsearch mapping.

When I set allow null to the properties then sorting does not work.

Please guide what should I do.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2018, 11:33am UTC](https://discuss.elastic.co/t/mapping-for-text-and-date-field-that-should-be-null-able-and-sort-able/126932/3 "2018-04-06T11:33:20Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

---

<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 4, 2018, 11:35am UTC](https://discuss.elastic.co/t/mapping-for-text-and-date-field-that-should-be-null-able-and-sort-able/126932/5 "2018-05-04T11:35:18Z")

</div>

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