Right mapping?


(Remco Zwaan) #1

Hi,

Each property has availabity. We make for each property 365 available days in our index. When a property is booked we remove the dates from the index. This works ok.

Now we want a step further. We have price diversity per number of guests. So we want to store in de index prices based on number of guest.

What is the best data mapping to do this? We have now this, but i am not sure if this is the right mapping ?

  "properties": {
              "adults": {
                "type": "long"
              },
              "availability_adults": {
                "type": "long"
              },
              "availability_children": {
                "type": "long"
              },
              "availability_infants": {
                "type": "long"
              },
              "availability_price": {
                "type": "float"
              },
              "available_on": {
                "type": "date"

(Mark Walkom) #2

Does that change over time?


(Remco Zwaan) #3

yes it does. Sometimes we lower or higher the price. In case of promotions ect


Best mapping strategy
(Mark Walkom) #4

Your mapping looks ok but you may want to look at an integer or a short to improve things.

Also, have you considered changing this into a time based structure? Then you do things like see changes over time for a property.


(Remco Zwaan) #5

i give you example how its stored in postgress DB

Property X

1 - 30 june / 4 adults = 200 per day
1 - 30 june / 6 adults = 300 per day
1 - 30 june / 4 adults + 2 children = 250 per day

1 - 31 july / 4 adults = 300 per day
1 - 31 july / 6 adults = 350 per day
1 - 31 july / 4 adults + 2 children = 350 per day

ect

Property Y

1 - 30 june / 2 adults = 100 per day
1 - 30 june / 3 adults =120 per day
1 - 30 june / 4 adults = 150 per day
1 - 30 june / 2 adults + 1 child = 110 per day
1 - 30 june / 2 adults + 2 child = 120 per day

ect

We initiale define the price strategy / entry at beginning of the season. In the season prices can changes in case of promotions ect.

remco


(system) #6

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