ryanhugh / searchneu

Search over Classes, Professors and Employees at NEU!
https://searchneu.com
GNU Affero General Public License v3.0
74 stars 18 forks source link

Add Filter to Search #1

Open ramimac opened 7 years ago

ramimac commented 7 years ago

Right now there is no easy way to narrow down generic search terms to only show results that are Employees, or Classes.

ryanhugh commented 7 years ago

Yup! Filters are definitely on the to do list. Also want to add Buildings at NEU, Student clubs, some other data sources and a bunch of other things.

ryanhugh commented 6 years ago

Things that we can add support for filtering over:

The most-requested filter is definitely filtering over class attributes. Lets add filters after the class attributes data is scraped.

The filter on this site works great on mobile and desktop. We could copy some parts from it: http://www.futhead.com/17/players/?sortbot=aggression&sortbot=attr4&bin_platform=ps

The filter here is pretty similar and also operates will pills: https://www.google.com/flights/beta#flt=PHL,ZFV.SFO.2018-01-03;c:USD;e:1;s:0;md:720;sd:1;t:f;tt:o

The filtering on AIrbnb also works really well

edward-shen commented 6 years ago

Bumping this, since I just had a friend suggest filtering as a new feature request.

edward-shen commented 6 years ago

How would filtering work? Is this something we can implement in our backend, e.g. in /common/search.js, or would we need to do client-side filtering?

ryanhugh commented 6 years ago

I'm thinking it would be in the backend and implemented pretty similar to searching only in a specific term work right now. The client would click a bunch of dropdowns, the selections would go on the state, be sent to the server as part of the request, and then common/search.js would perform the search and return the results. The two caches (in the frontend and the backend) would have to be updated with the new results too.

I miiight have some time to spend on this, not sure

ryanhugh commented 6 years ago

Also for keeping track of all of these in the URL we could do the same thing as Airbnb and just use query params. I'm thinking that the termId could be a part of the path because that is required, but the rest are just going to be optional. Eg:

https://searchneu.com/201830/cs?onlineOnly=true&nupath=writingintensive&seatsAvailible=true ...