There are no aggregate functions under solr in how you can think of them from SQL. The easiest way to do this is to perform a two-step process:
- Get the maximum value through the corresponding query using sorting
- use it with max () function
So something like:
q=*:*&sort=view_count desc&rows=1&fl=view_count
... to get the element with max view_count that you are recording somewhere and then
q=whatever&bq=div(view_count, max(the_max_view_count, 1))
Note that the max () function does not execute the aggregate maximum; just by getting the maximum maximum number of views you transmit, or 1 (to avoid errors with separate errors).
multiValued ( ), StatsComponent, . , , , , (, -, ).