searchneu icon indicating copy to clipboard operation
searchneu copied to clipboard

Add Filter to Search

Open ramimac opened this issue 7 years ago • 6 comments

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

ramimac avatar Jun 21 '17 01:06 ramimac

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 avatar Jun 21 '17 02:06 ryanhugh

Things that we can add support for filtering over:

  • Employees vs Classes vs other data sources
  • Is offered this semester
  • Online vs On-Ground
  • Class attributes (NU Path/NU Core)
  • Subjects
  • Seats available
  • Has sections
  • Time of day
  • Has prerequisites vs does not have prerequisites
  • Undergrad vs Graduate classes (eg less than 5000 or greater than 5000)
  • Majors and minors (#22)
  • Lecture vs Lab
  • etc

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

ryanhugh avatar Nov 09 '17 02:11 ryanhugh

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

edward-shen avatar Feb 16 '18 22:02 edward-shen

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?

edward-shen avatar Feb 16 '18 22:02 edward-shen

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 avatar Feb 17 '18 03:02 ryanhugh

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 ...

ryanhugh avatar Feb 17 '18 10:02 ryanhugh