Hi,
I see a strange behaviour, not sure if its because of Sphinx or TS.
I have a polymorphic model called Modul. There are two modulable types
called 'Chapter' and 'Activity'
It is delta indexed.
When i run the indexer, moduls table only contains 'Chapter'
modulable_type entries. Two entires initially which i load through
migrations.
#Sphinx
define_index do
#Fields
indexes :name, :as => :modul_name, :sortable => true
#Attributes
has "CRC32(modulable_type)", :type => :integer, :as
=> :modulable_type
has parent_id, :as => :parent_id, :sortable => true
has created_at, :sortable => true
has modulable.chapter_type, :type => :integer, :as
=> :chapter_type, :sortable => true
has modulable.objectives, :type => :integer, :as
=> :activity_objectives, :sortable => true
#Turning delta index "ON"
set_property :delta => true
end
Now when i try to get the 'Activities', it returns me an array of nil
objects. I guess these objects are the 'Chapter' modulable type.
>> Modul.search :with => {:modulable_type => 1426221836}
=> [nil, nil]
TS should have returned []
Regards,
Pratik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
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
-~----------~----~----~----~------~----~------~--~---