I have a Title model, which has many :contents. My index for the Title looks 
like this:

  define_index do
    set_property :group_concat_max_len => 10.megabytes

    indexes :title, :sortable => true
    indexes teaser
    indexes :author_name, :sortable => true
    indexes contents(:plain), :as => :content
    has created_at, updated_at
    where sanitize_sql(["publish", true])
  end

Content has a column called plain, which is a MySQL LONGTEXT containing a 
single line of text up to 10MB per row, and a title_id. Content belongs_to 
Title, and Title has_many Contents. All is clear in this fashion so far.

Running ts:index, ts:rebuild, etc. does not seem to cross the joined model 
barrier, instead I get the error "skipping non-plain index" in my log. I added 
an index to Content, and was able to index that separately, and find results in 
it, but getting it to happen through Title is not giving me the results I 
expect.

I got the indexes contents(:plain), :as => :content bit directly from the docs, 
and I could swear it used to work. Any ideas?

Thanks,

Walter


-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to