Design a car booking application using elasticsearch

I need help developing a car booking application. There is a document with information about the car (name, model, brand, information, etc.).

Problems I'm stuck with:

  • How to keep available reservation days? (I suppose I could use nested free date range objects in an array)

  • How to store the price per day (it is possible to have an individual price per day)?

  • Booking days and prices may change frequently. So, the third question: "How to quickly update them (partially), so I should not read the document, and then store it." I am considering a script solution using update api ( http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html ), but it looks ugly. Maybe there are other approaches?

Thanks Alex

+7
elasticsearch schema-design
source share
1 answer

with the introduction of data types, there is no need to use a real nested object if you had this in mind.

It can also help you with saving prices, but it can just be any object that I assume (it depends on whether you want to look for it too).

The update API was created just for this use case, which you do not need to get the whole document, so shounds like a plan.

0
source share

All Articles