Foros de discusión
Rating score is set to 5 for all blog search results
Durai pandian, modificado hace 11 años.
Rating score is set to 5 for all blog search results
Junior Member Mensajes: 53 Fecha de incorporación: 26/10/12 Mensajes recientes
In blog search result score is set to 5 for all blog.
need to customise average rating there.
please help me with this
Regards,
Durai.
need to customise average rating there.
please help me with this
Regards,
Durai.
Tejas Kanani, modificado hace 11 años.
RE: Rating score is set to 5 for all blog search results
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Which version of Liferay are you using ?
Durai pandian, modificado hace 11 años.
RE: Rating score is set to 5 for all blog search results (Respuesta)
Junior Member Mensajes: 53 Fecha de incorporación: 26/10/12 Mensajes recientes
Thank u friend, I got solution by editing my search.jsp file with the following code:
float averageScore = (float)RatingsStatsLocalServiceUtil.getStats(BlogsEntry.class.getName(), entry.getEntryId()).getAverageScore()/5;
float averageScore = (float)RatingsStatsLocalServiceUtil.getStats(BlogsEntry.class.getName(), entry.getEntryId()).getAverageScore()/5;