# Managing / mapping of 365 entries per doc

**URL:** <https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111>\
**Category:** Elasticsearch\
**Created:** [December 3, 2018, 8:02am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111 "2018-12-03T08:02:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![devozanges](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devozanges/32/23425_2.png) [@devozanges](https://discuss.elastic.co/u/devozanges)\
**Post date:** [December 3, 2018, 8:02am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/1 "2018-12-03T08:02:09Z")

</div>

For the context of real estate rental, I am provided among the data of each property to rent a string of 365 characters, which globally defines if the property to rent is free or not on the days of the year represented.  
I could make a data table that contains 365 entries but first I would like some advice on how best to map these values and queries.  
Thank you very much for the opinions on the different ways of doing things.

---

<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:** [December 3, 2018, 8:15am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/2 "2018-12-03T08:15:43Z")

</div>

Have a look at [date\_range](https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html) data type. That might be the right candidate for your use case.

---

<div class="post-metadata">

**Author:** ![devozanges](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devozanges/32/23425_2.png) [@devozanges](https://discuss.elastic.co/u/devozanges)\
**Post date:** [December 3, 2018, 8:40am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/3 "2018-12-03T08:40:38Z")

</div>

In fact, my chain of 365 characters will contain letters exclusively with for example F for free or B for busy. I don't know in which direction to start

---

<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:** [December 3, 2018, 9:01am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/4 "2018-12-03T09:01:39Z")

</div>

I'd convert this string as an array of availabilities before indexing the document.

---

<div class="post-metadata">

**Author:** ![devozanges](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devozanges/32/23425_2.png) [@devozanges](https://discuss.elastic.co/u/devozanges)\
**Post date:** [December 3, 2018, 11:30am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/5 "2018-12-03T11:30:10Z")

</div>

Thank you, I'll go in that direction.

---

<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:** [December 31, 2018, 11:30am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111/6 "2018-12-31T11:30:21Z")

</div>

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