SolR Query - Price ranges

2019-06-03 06:01发布

问题:

I'm querying SolR server to get the price ranges.

How can I construct a query which returns at once:

  • price range for all of the items (without facet query)
  • price range (or list) for items with facet query

I need these four values for a slider like this:

all_min=============user_min========user_max========all_max

回答1:

Use StatsComponent to get min and max. Use facet.range or facet.query to get facets on specific price ranges.