We have ratings now; we should show them on the search results improve our SEO.
Ratings appear alongside openlibrary search results.
Google has documentation about how to do stuff like this: https://developers.google.com/search/docs/data-types/review-snippet
E.g. compare openlibrary results with GoodReads results:
| Open Library | GoodReads |
| ---- | ---- |
| | |
Google pulls these from schemas for each item defined by schema.org. In GoodRead's case they are using schema.org/Book which makes sense. Inside that is an AggregateRating schema. This is what the stars are based on.
It doesn't look like openlibrary displays an aggregate rating, just ratings as part of each review. Might need to add that (visible or not).
How Google does what it does is a black box, but it looks like they want you to pull reviews from your own site (as opposed to an external site). You can't guarantee yourself the stars, but if you put in the schema it should take a week or less for them to pop up (if they are going to at all).
Here's google's documentation: https://developers.google.com/search/docs/data-types/review-snippet ( added to issue ). The displayed rating on e.g. https://openlibrary.org/books/OL383855M/Harry_Potter_and_the_Chamber_of_Secrets is the average of all ratings; we don't have a feature to display individual reviews.
This would require implementing microdata across many UI components.
However, I think maybe #163 has some impediments over this?
@samuelpetroline There is already microdata for a lot of UI components. This would require adding some more to probably this line in the Edition's template: https://github.com/internetarchive/openlibrary/blob/310e4d55904033905aa7caa5fabeb82e78b9f71e/openlibrary/templates/type/edition/view.html#L200
Note that file already has schema.org/Book
microdata.