Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Durai pandian
Rating score is set to 5 for all blog search results
October 28, 2012 10:14 PM
Answer

Durai pandian

Rank: Junior Member

Posts: 53

Join Date: October 26, 2012

Recent Posts

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.
Tejas Kanani
RE: Rating score is set to 5 for all blog search results
October 29, 2012 12:40 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 652

Join Date: January 6, 2009

Recent Posts

Which version of Liferay are you using ?
Durai pandian
RE: Rating score is set to 5 for all blog search results
October 29, 2012 5:33 AM
Answer

Durai pandian

Rank: Junior Member

Posts: 53

Join Date: October 26, 2012

Recent Posts

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;