Hi Bertrand
Something's definitely a little odd here. What does your define_index block
look like? Also: are there specific situations where you're updating the
locale_id value in the database?
Thinking Sphinx will automatically update simple (integer, boolean, timestamp)
attributes - provided they're not from associations or via SQL snippets.
However, if Sphinx isn't running, then this doesn't happen (so, that's one
potential cause for this situation).
The other scenario is that maybe you're updating locale_id using
update_attribute (note the singular, not plural) - which doesn't invoke any
callbacks - and so the Sphinx attribute is not updated.
Hope this provides some clarity to the situation.
Cheers
--
Pat
On 10/10/2010, at 10:19 AM, Bertrand wrote:
> I'm using Rails 2.3.5 and the thinking_sphinx gem 1.3.20 on Ubuntu
> Linux.
>
> Here's a snippet from my console that doesn't make much sense when
> reading the docs....
>
>
>>> Translation.search('notifications', :star => 1, :with => {:locale_id =>
>>> 1}).detect {|t| t.locale_id != 1}
> => #<Translation id: 1744, scope: "shared.tips_notifications", tkey:
> "turn_on_notifications", locale_id: 2, needs_change: nil, value:
> "Activez tous les alertes email pour être sûr de n...", created_at:
> "2010-10-09 11:35:05", updated_at: "2010-10-09 11:35:05">
>
> Why is it returning anything? Shouldn't the :with option be filtering
> on this very attribute?
> I reindexed sphinx just before and all the configuration options seem
> a-OK.
>
> --
> 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.