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].
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.