Thanks Pat...looks like that worked!

On Wednesday, November 14, 2012 3:10:31 AM UTC-8, Pat Allan wrote:
>
> Yeah, rake or ruby probably add a format method to the global scope. 
> Wouldn't surprise me.
>
> Try using the column reference as opposed to the alias in your WHERE 
> clause: formats.name instead of format_name.
>
> Cheers
>
> -- 
> Pat
>
>
> On 14/11/2012, at 10:11 AM, gmoniey wrote:
>
> > Hi,
> > 
> > I have a simple define index, and I want to limit the indexed records to 
> those that have an association on a nullable field. Here is what my 
> define_index block looks like:
> > 
> >   define_index do
> >     indexes :name, :sortable => true
> >     
> >     has :format_id, :created_at
> >     has assoc(:format).name, :as => :format_name
> >         
> >     where "my_table.deleted = 0 AND (format_id IS NULL OR format_name 
> LIKE 'Indexable Format Name%')"
> >     
> >     set_property :delta => :delayed
> >   end
> > 
> > The error that I get when indexing is: Unknown column 'format_name'. I 
> was wondering if the above is even possible?
> > 
> > Also, just wanted to double check that my assoc has line is correct? 
> Seems like 'format' is a reserved keyword.
> > 
> > Thanks.
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Thinking Sphinx" group.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msg/thinking-sphinx/-/YCHISgI1onAJ.
> > To post to this group, send email to 
> > [email protected]<javascript:>
> .
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
> > 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 view this discussion on the web visit 
https://groups.google.com/d/msg/thinking-sphinx/-/LpCpRy9jc_EJ.
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.

Reply via email to