On Mar 30, 5:06 pm, Pat Allan <[email protected]> wrote: > The issue is definitely tied to delta indexes. Sphinx calculates it's > ordinal attributes from strings on a per-index basis - so the core > index is one set of values, the delta index another, and treated as if > they're unrelated.
That's so... weird. I have a few ideas.. - disable the delta index completely - make the delta index clear out quicker - create our own ordering algorithm that stores an integer representation of that field, suitable for ordering, and index that? What would that algo look like? Courtenay > Unfortunately - at this point, anyway - Sphinx doesn't allow attribute > updates for ordinal values (only integers, timestamps and booleans). > I've submitted a patch to see this be changed, but haven't heard > anything back about it so far. So, there's not much I can offer as a > way forward, beyond the :sql_order option, which does sorting on the > ActiveRecord side, but only within the page of > results.http://groups.google.com/group/thinking-sphinx/msg/8c32a3d25567ab4b > > Sorry I don't have a proper fix. > > -- > Pat > > On 31/03/2009, at 10:54 AM, court3nay wrote: > > > > > Hey guys, > > > I have sphinx running smoothly but I'm seeing weird results with > > ordering. For example, I have users indexed like > > > define_index do > > indexes :email, :created_at > > indexes "LOWER(`profiles`.`full_name`)", :as > > => :full_name, :sortable => true > > indexes profile.location, :as => :location > > end > > > When I do this > > > User.search :conditions => { :location => "Brooklyn" }, :match_mode > > => :any, :order => "full_name ASC" > > > It only sorta returns the results in alpha order. On the first page > > there's one or two results where the full_name starts with a "J" > > surrounded by entries starting in "A". The second page is still all > > A. > > > When I run "search" from the command line, these spurious results are > > not in the "user_core" index, but they ARE in the "user_delta" index. > > There are only 4 users in the "user_delta" index. > > > So.. delta index weirdness? Jobs not set up properly? Indexing > > incorrect? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
