i'm looking forward to seeing this pushed as a live project - nice work!

so, i was looking at the screenshot for the sample query with exposed facets and something sort of obvious jumped out at me:

when users rate, they use 5 stars - and what they SEE are only stars - even though the system runs a calculation and produces a numeric that gets exposed and is now handled properly by your module for search api.

however, when presented back to the user in the form of a facet, the numbers are in fact really confusing (for example, what does 58 mean? do users even know that this is on a 100 point scale?)

would it be possible to simply present the facet as either text like:

5 Stars
4 Stars
etc

OR, even better, as the rendered widget images - but not with 'ajax for rating' but simply as images in place of the facet text
- see attached image for a sample of how amazon does it

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Demoshane’s picture

I can look into this when I manage to squeeze some time from client projects.

zilla’s picture

thanks - that would be awesome...i was also wondering if this is something that could somehow be controlled with just some CSS magic or something?

alternatively, i was wondering if the various numbers could be forced to simply "round up" to the nearest (above/below) 5 star integer

the problem that i obviously see is presenting the '4.5 stars' scenario versus 4 or just 5. in this case, it looks more like what amazon does where they just say "4 stars and up" or "3 stars and up" which effectively is not saying "only things rated as "3 stars" but rather, everything that is "3 stars or higher than 3 stars"

that seems to be the more logical way to group ratings. the alternative is literally showing *only* items rated as 3 stars (and not 4 or 5)

...at any rate, just something to consider

oxyc’s picture

Version: » 7.x-1.x-dev
Status: Active » Needs review
FileSize
9.6 KB
19.92 KB

Here's a first patch that renders static fivestar widgets (simply the star widget). Could still be improved but for now I wont have time to work more on it.

Fivestar facetapi example

oxyc’s picture

I added additional support for prefix/suffix (so you can add & up like amazon) and a range widget if search_api_ranges is enabled.

Using the advanced range option you can for example setup Amazon style filtering using

0-
1-
2-
3-
4-
5
oxyc’s picture

Status: Needs review » Needs work
FileSize
17.63 KB

Earlier patch wasn't much tested. The following is a bit more tested but still a work in progress.

It requires the -dev version of `search_api_ranges`, patched with:
- https://www.drupal.org/node/2458171#comment-9777895

It also requires you to set up the advanced range with open endings, as:

0-
1-
2-
3-
4-
5-
Demoshane’s picture

I'll try to arrange some time to have a look at this.