So I have a very complex internationalized index that has really
pushed the boundaries of what is possible in sphinx. Crazy stuff
like:
has "GROUP_CONCAT(CONCAT(authorizations.distributor_id,
LPAD(authorizations.country_id, 3, 0)) SEPARATOR ',')", :type
=> :multi, :as => :country_distributor_composite_id
Now I am faced with needing to create a different sort order for each
country. That means 248 separate attributes generated from the list
of countries like this:
Country.all.each do |country|
has "IF(authorizations.country_id = country.id,
authorizations.created_at, NULL)", :type => :datetime, :as
=> :"authorized_at_in_#{country.code}"
end
I have no idea whether this will be performant or not... I wanna give
it a try, but the config file itself is getting a `line too long`
error. Is there some way to inject newlines into the index? I tried
editing the development.sphinx.conf directly, but calling ts:index
automatically reconfigures overwriting this file. I'd prefer not to
have to hack on the rake infrastructure since I also use it in a bunch
of tests.
Any ideas?
--
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.