I’m using laravel and Vue InstantSearch for my website.
I’ve developed a rating system that calculates the average rating of a product for every review left for it.
The average of course could be: 3.5, 4.7, etc.
I was hoping to use this with the rating component, however it seams that component only works with integers not floats.
Is there a way to use that component with a float ?
Alternatively I’m ok with rounding the average for the rating component so that it works.
I can’t round the float before I send it to Algolia because I need to use the float figure to display the star ratings on the products in the search e.g a rating of 4.5 would display 4 and a half stars out of 5.
Any ideas or help?
I’d really appreciate it, thanks in advance.