Manjunath Manoharan
Manjunath Manoharan

Reputation: 4617

thinking sphinx options

I'm confused, when should we use indexes and has method in sphinx. I have a very vague and abstract idea about it.I was told for date range we use has method. But nowhere I could find a concrete explanation for this.

Upvotes: 0

Views: 86

Answers (1)

pat
pat

Reputation: 16226

The indexes method is for fields - and fields are the textual/string data that contain words you expect people to search for.

The has method is for attributes - which are mostly integers, floats, timestamps and boolean values, which are used by developers for sorting, filtering and grouping. If you want to filter for records given a date range, then an attribute is the best tool for the job.

Upvotes: 2

Related Questions