The brackets combine multiple columns into a single field or attribute - so the example below combines both first_name and last_name into a single field called name.
indexes [first_name, last_name], :as => :name Whereas the next example just creates two fields, from the appropriate columns - first_name and last_name: indexes first_name, last_name I really should add the former to the official docs - thanks for pointing out the inconsistency. Cheers -- Pat On 10/12/2010, at 2:07 AM, Benjamin Moses Lieb wrote: > This page > http://freelancing-gods.com/posts/a_concise_guide_to_using_thinking_sphinx > references this syntax: > > indexes [first_name, last_name], :as => :name > > However the official docs (http://freelancing-god.github.com/ts/en/) > don't mention this at all, as far as I can tell. > > What do the brackets do in this case? > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
