Hi Luciano
I'm not quite sure what you're asking (I understand English isn't your first
language, but I'm afraid I don't speak Portuguese - or any other languages,
really).
Do you want to filter by that attribute? If so, something like the following
should work:
XPTO.search 'foo', :with => {:house_start => 1.day.ago..Time.now}
Or, are you getting errors when indexing? Make sure you have another reference
to open_houses to force the SQL join:
has open_house(:id), :as => :open_house_id
Or, if it's a has_many:
has open_houses(:id), :as => :open_house_ids
Or if it's another issue completely, let me know :)
Cheers
--
Pat
On 28/07/2010, at 7:20 AM, Luciano Sousa wrote:
> hello guys,
>
> i have a table that makes the association with a table B, and I need
> to search a column in that table B, how can I do that?
>
> a example is:
>
> inside class XPTO have this code:
>
> has "CAST(open_houses.start AS DATE)", :as => :house_start, :type
> => :datetime
>
> i find the value in "start"
>
>
> thank's
>
> --
> 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.