Elastic search for caching and searching the product? Elastic search for caching and searching the product? elasticsearch elasticsearch

Elastic search for caching and searching the product?


Elasticsearch can be used as cache or an searchengine. By default elasticsearch index data is persistent (filesystem), you can also configure it for memorymap

Refer below for various File system storage Typeshttps://www.elastic.co/guide/en/elasticsearch/reference/6.3/index-modules-store.html

ElastiCache is an in-memory data store service provided by Amazon (AWS) which you can use for caching.

Your proposed solution of selecting Elasticsearch is a good choice since its open source it can be used on-premise or you can use cloud services. Elasticsearch would give your more control over your search compared to caching frameworks like Redis.

You can do more complex searches like giving custom Weights based on your keywords and search a result. e.g. For your case search for Hotels, you can create any possible filters flexibly like Pricing Class, With Parking, With Balcony...etc.

But the main thing is you need to build the index from your datasource and the index would serve your site. Where as in cache your cache is getting build whenever you make queries to datasources.