Gibt es eine Möglichkeit, den Typ eines STI-Modells (eine polymorphe Modell-Assoziation in Ruby) und nicht selbst zu indizieren? Zum Beispiel habe ich ein Modell Comment
:Denken Sphinx - wie Index Typ von STI-Modell
class Comment < ActiveRecord::Base
belongs_to :commenter, polymorphic: true
...
end
Ist es möglich, Sphinx zu indizieren commenters
und nicht comments
zu bekommen?
zu spezifisch sein, statt sphinx.conf
wie
source comment_core_0
{
...
sql_query = SELECT SQL_NO_CACHE comments.id * 60 + 2 AS id,
'Comment' AS sphinx_internal_class_name,
comments.id AS sphinx_internal_id,
'Comment' AS sphinx_internal_class
...
}
ich auf der Suche sphinx.conf
aussehen möchte:
source comment_core_0
{
...
sql_query = SELECT SQL_NO_CACHE comments.commenter_id * 60 + 2 AS id,
commenter_type AS sphinx_internal_class_name,
comments.commenter_id AS sphinx_internal_id,
commenter_type AS sphinx_internal_class
...
}
Dank