Managing / mapping of 365 entries per doc


(Devozanges) #1

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.


(David Pilato) #2

Have a look at date_range data type. That might be the right candidate for your use case.


(Devozanges) #3

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


(David Pilato) #4

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


(Devozanges) #5

Thank you, I'll go in that direction.