tags:

views:

22

answers:

1

Hello,

Im using sphinx for document search. Each document has list of integer parameters, like "length", "publication date (unix)", popularity, ... .

The search process itself works fine. But is there a way to get a maximum and minimum fields values for a specified search query?

The main purpose is to generate a search form which will contain filter fields so user can select document`s length.

Or maybe there is another way to solve this problem?

A: 

It is possible if length, date etc are defined as attributes.

http://www.sphinxsearch.com/docs/current.html#attributes

Attributes are additional values associated with each document that can be used to perform additional filtering and sorting during search.

tszming
You didnt get it. I know how to filter and select specified documents. The question was about aggregate functions without getting the documents. Btw, i already solved it.
Dan Sosedoff

related questions