Pablo Anzorena created SOLR-8350:
------------------------------------

             Summary: Filters on Aggregate Data Subfacets
                 Key: SOLR-8350
                 URL: https://issues.apache.org/jira/browse/SOLR-8350
             Project: Solr
          Issue Type: Improvement
            Reporter: Pablo Anzorena
            Priority: Minor


Hey, I got an idea that I'm pretty sure it is not supported.

Let's assume the schema in solr has at least the following fields:
transaction_id,
product_id,
company,
price

Let's imagine we are Amazon, and we want to analyze the top 10 companies that 
have sold more than US$ 100,000,000. 
Nowadays, the filters are only applied to each solr record and not over 
aggregated data, so there is no way to achieve this (at least natively) from 
solr.
It is more like a BI Tool capability.

It would be nice to have this feature in the subfacets module, for example:
companies: {
  type: terms,
  field: company,
  limit: 10,
  offset: 0,
  sort: "price desc",
  facet: { price: "sum(price)"},
  aggfilter:"price > 100,000,000"
  }
}

And it would be even better to support logic expressions in the "aggfilter" 
field. For example:
companies: {
  type: terms,
  field: company,
  limit: 10,
  offset: 0,
  sort: "price desc",
  facet: { price: "sum(price)"},
  aggfilter:"price > 100,000,000 OR other_measure < 100"
  }
}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to