Hi Greg
I'll start with the obvious, apologies if you're on top of this already: Did
you restart Sphinx as well as re-indexing? Restarting is required when you
change an index structure, or add or remove indexes.
Cheers
--
Pat
On 03/02/2011, at 12:30 AM, Greg wrote:
> I am trying to create a grouped facet as follows:
>
> Price
> - Under £50 (123)
> - £50 or over (12)
>
> This is my index definition:
>
> define_index do
> indexes "''", :as => :empty
> has "IF(price <50, true, false)", :as => :price_lt_50, :type
> => :boolean, :facet => true
> has "IF(price >=50, true, false)", :as => :price_gte_50, :type
> => :boolean, :facet => true
> end
>
> I have checked the SQL that TS generates, and it correctly returns
> true or false depending on the price. However, after I have reindexed,
> when I query the facets in Rails, empty hashes are returned as
> follows:
>
>> Item.facets
>> {:price_lt_50=>{}, :price_gte_50=>{}}
>
> What am I doing wrong?
>
> Many thanks
> Greg
>
> --
> 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.