Can the search results be averages of a certain number field?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can the search results be averages of a certain number field?

aceman
This post has NOT been accepted by the mailing list yet.
I am a Solr newbie, I am not a developer, just someone who works in marketing analytics who has learned the search query basics. Please excuse my ignorance.

My company has indexed a bunch of data, and I know how to use the Solr UI to search for documents. LEt's say they are a database of customers, and each document contains fields that correspond to characteristics or data of the customers: name, location, # of items purchased, average dollar amount purchased, total dollar amount purchased.

When I search for something like who are the customers with last name Smith, you get a exact number that represents how many documents are returned (eg 150 customers with last name Smith), and then the list of their details. Like Google, so far so good.

I am wondering, if I can get the results to display the average of a certain field? For example, for the customers with last name Smith, what is their average purchase price? Right now I get a list of each customer's purchase price, but can I get the average to display via Solr query?