I recently just ran into an issue where it seems that Sphinx is not indexing
all of my data. I have an Asset model with the following define_index block:
define_index do
indexes title, :sortable => true
indexes alternate_titles.title, :as => :alternate_titles
set_property :enable_star => 1
set_property :min_infix_len => 1
where "asset_status_id = (select id from asset_statuses where name =
'approved')"
indexes type, author, publisher, director, writer, producer, artist
has original_language(:id), :as => :original_language_id
has country(:id), :as => :country_id
has mpaa_rating(:id), :as => :mpaa_rating_id
has genres(:id), :as => :genre_ids
has 'YEAR(release_date)', :as => :release_year, :type => :integer
has decade(:id), :as => :decade_id
indexes taggings.tag.name, :as => :tag_names
end
Here are the results of two calls that show the discrepancy:
ruby-1.9.2-p0 > Asset.search_count
=> 1709
ruby-1.9.2-p0 > Asset.count
=> 1767
I've run rake ts:rebuild countless times trying to figure this out, but I
really have no idea where to look. I'm on the rails3 branch and at version
2.0.0, using ruby 1.9.2p0. Any help you can give me would be greatly
appreciated, even if it's just a hint about where to try looking next. My
co-worker has the same issue, but is only missing one Asset instead of 58.
--
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.