Skip to content

feat: search rate my professor reviews by meaning - #642

Draft
jaspermayone wants to merge 1 commit into
feature/similar-catalog-recordsfrom
feature/review-search
Draft

jaspermayone wants to merge 1 commit into
feature/similar-catalog-recordsfrom
feature/review-search

Conversation

@jaspermayone

@jaspermayone jaspermayone commented Sep 19, 2026

Copy link
Copy Markdown
Member

Part of #453. Stacked on #641.

Search Rate My Professors reviews by meaning, so "lots of group projects"
finds the reviews that say so in other words.

curl "…/api/v1/catalog/reviews?q=lots+of+group+projects&semantic=true"
curl "…/api/v1/catalog/reviews?instructor=fac_kw7coe30&sentiment=negative"
{ reviews(q: "team assignments", semantic: true, first: 10) { nodes { comment instructor { name } } } }

The admin review list gets the same search, with a "By meaning" box, and now
shows the comment it searches.

What this publishes

Review text was already stored, and /api/faculty already returns it to
signed-in users. This puts it on the unauthenticated catalog API, so it is
worth a second look before merging:

  • Only reviews that carry a comment are returned. Ratings with no words say
    nothing a reader could search.
  • Every review, and the meta of every page, names ratemyprofessors.com as
    the source, so a client can credit it and link back.
  • instructor, sentiment, q, and semantic are the filters. Pages are 25
    by default and 100 at most.

Also in here

Catalog::FilterError is now the shared parent of the query objects' filter
errors, so the new ReviewQuery returns a 400 through the same handler that
SectionQuery uses, on REST and on GraphQL.

Tests

bundle exec rspec is green locally (1583 examples), covering the query
object, the REST endpoint, the GraphQL connection, and the admin search.

Stack created with GitHub Stacks CLIGive Feedback 💬

Adds /api/v1/catalog/reviews and a reviews query to GraphQL, both with
semantic=true, and a search box on the admin review list. Only reviews
that carry a comment are returned, and every payload names
ratemyprofessors.com as the source so a client can credit it.

Filter errors now share Catalog::FilterError, so the new query object
returns a 400 the same way the section query does.
@jaspermayone
jaspermayone added this pull request to stack #643 September 19, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant