We are working on a RoR project which is using the following search template:
[login to view URL]
Our exact Requirement is given below:
Filter products page (for ex: https://www.amazon.in/s/ref=nb_sb_noss?url=node%3D1389401031&field-keywords=one+plus+6)
a. filters will be from given list.
b. Filters should work in the following way:
a1: if I want products whose price is greater than 5000,
then I will pass this in query string [login to view URL]>5000
b1: if I want products whose price is between 5000 and 10000,
then I will pass this in query string [login to view URL]>5000&[login to view URL]<10000
c1: if I want products whose seller has delivered more than 100 orders
In this case, data will be fetched from 3 tables
1. Products -> has_many available sellers
2. User -> has_many delivered orders
3. Orders -> belongs_to delivered_by(User)
So the key should be [login to view URL]>100
Basically, the database query structure should be designed in such a way that we can put conditions on any table which has an association with products(at any level) just by changing the query string in browser.
c. Basic Design of front side page will be given. You have to implement the functionality with that.
e. Implement EleasticSearch for string-based search. Rest filter will be done by SQL queries.
The front end is in Jquery
The backend is in Ruby on Rails
Database is Postgres
This is to be implemented in existing rails project where DB architecture is already done.