Closed (works as designed)
Project:
Search API
Version:
7.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2012 at 12:51 UTC
Updated:
24 Jun 2012 at 09:53 UTC
Hi,
I have an issue with combination of Search API and Fivestar (Vote API). I currently use Database engine for Search API (while in development, probably use Solr in production).
I can add fivestar > average rating as related field. Also I choose kind of index etc. Save, click on index. No problem.
However, it doesn't work when i try to sort on average rating. So I checked in database, where I can see that no values at all have been indexed:
mysql> SELECT * FROM search_api_db_index_field_fivestar_rating_average_rating;
+---------+-------+
| item_id | value |
+---------+-------+
| 7 | 0 |
| 10 | 0 |
| 12 | 0 |
| 15 | 0 |
| 17 | 0 |
etc...
Anyone got any idea of how to solve this? This is quite critical for me, but don't really have any clue to way this happens.
Comments
Comment #1
BeaPower commentedSame issue as well...
Comment #2
drunken monkeyDid you index after there were ratings? If you index before, the average will of course be 0 (or, indeed, arbitrary). (You'll therefore probably need some mechanism to index the entities periodically, even if they themselves don't change.)
If you're sure that that isn't the problem, please move this issue to the Fivestar module. It would then seem that their property getter callback doesn't return the right values (at least in this situation).
Comment #3
Zahak commentedYes, ratings were there before indexing. I'll see what they say. Also, I'll probably try to get some time to do some research myself.
Comment #4
Zahak commentedSeems like they are debating the issue here: #1256572: Integrate with Entity API.