bounswe / 2021SpringGroup10

3 stars 1 forks source link

Implementing advanced search endpoint #296

Closed berkaydemirtas closed 2 years ago

berkaydemirtas commented 2 years ago

An endpoint for advanced search should be implemented. With this endpoint user should be able to search for spesific fields of the posts inside of a community. For example user should be able to check all the posts that has "hiking" inside their plainText field. Also user may want to search for some spesific ranges for some fields. For example user can check all the posts that has a price value between 15 TL and 25 TL. Advanced search can be done on PlainText, DateTime, Location, Participation and Price fields. This will be a GET endpoint. This endpoint will accept a user_name, community_id and search_dictionary. An example request to this endpoint as follows : { "user_name":"berkdddd", "community_id":"10", "search_dictionary": {"Price" : {"min_price" : "17", "max_price":"18", "currency":"TL"},"Location" : {"longitude":-77.0364, "latitude":30, "radius":"1000"}, "DateTime" : {"starting_date": "10/03/2019" , "ending_date":"15/03/2021", "starting_time": "12:00" , "ending_time":"13:00"},"Participation" : {"min_participation" : 1, "max_participation" : 3}} }

berkaydemirtas commented 2 years ago

This endpoint is implemented, tested and merged. PR id is #261. Note that this pr also contains some bug fixes in other endpoints. It is ready to use !!!