Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes the case library searchable #161

Merged
merged 18 commits into from
Nov 1, 2017
Merged

Makes the case library searchable #161

merged 18 commits into from
Nov 1, 2017

Conversation

cbothner
Copy link
Member

@cbothner cbothner commented Oct 31, 2017

This PR adds search to the library. The full text of the cases can be searched, for which the title, dek, kicker, and summary are weighted highest; the titles of pages, podcasts, and activities, and the authors names are weighted second highest; and the contents of paragraphs are weighted third highest. Search is implemented in Postgres with an indexed materialized view of ts_vectors, so it’s really fast.

The search results view is also overloaded as the sub-indexes: while /catalog/search?libraries[]=michigan and /catalog/libraries/michigan show the same cases, the latter also displays a blurb about the MSC Library and functions as its directory page.

Migrations: HELL YES

Re: #112

@cbothner cbothner force-pushed the searchable branch 9 times, most recently from ecf3a36 to 0c0ecb1 Compare November 1, 2017 19:50
@cbothner cbothner changed the title Searchable Makes the case library searchable Nov 1, 2017
While it might seem right not to stem people’s names when building the
index, since we’re going to stem the search queries indiscriminately,
that’s the only way it will match
@cbothner cbothner merged commit af88dba into master Nov 1, 2017
@cbothner cbothner deleted the searchable branch November 1, 2017 22:33
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