The sortable option does behave a little differently with real-time indices (you need to use the _sort suffix when referring to it in order clauses), but this looks like a bug to me - the attribute underneath (which is the sortable component) isn’t noting the alias.
However, I’ve just written a test to confirm this works fine in the latest version of Thinking Sphinx (3.1.2) and I don’t think the related code has changed in the last few released. Which version are you using? — Pat On 7 Nov 2014, at 6:33 am, Jeanine <[email protected]> wrote: > I am modifying my active_record index to use a real_time index. When I > include the :sortable option, I am getting an error. My index file is as > follows: > > ThinkingSphinx::Index.define :product, :with => :real_time do > > indexes name, sortable: true > > has abbreviation, :type => :string > has created_at, :type => :timestamp > has updated_at, :type => :timestamp > has discipline.name, :type => :string, :as => "discipline_name" > end > > and my error is: > > Stopped searchd daemon (pid: 55085). > Generating configuration to /Users/js/Sites/igb/config/development.sphinx.conf > Started searchd successfully (pid: 55110). > Generating index files for product_core > rake aborted! > unknown column: 'name_sort' - REPLACE INTO product_core (id, > `sphinx_internal_class_name`, `name`, `sphinx_internal_id`, > `sphinx_internal_class`, `sphinx_deleted`, `name_sort`, `abbreviation`, > `created_at`, `updated_at`, `discipline_name`) VALUES (2, 'Product', > 'Revealing World Religions', 1, 'Product', 0, 'Revealing World Religions', > 'WR', 1219159749, 1219159749, 'Religious Studies') > > Tasks: TOP => ts:regenerate => ts:generate > > Is the sortable still used in the same way for the real_time indexing? I > couldn't find any documentation indicating otherwise. > > Thanks. > > > -- > 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. -- 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.
