Hi Eric I'm surprised this isn't working, but I'm not sure how Sphinx handles merging differing attribute values for the same record. What happens if you just use empty strings instead of 'null'?
Perhaps a different approach that may work: define the attributes with their own queries, instead of having multiple indices: has multi_element_choices.multi_element_value_id, :type => :multi, :source => :query Sphinx's docs on that are here: http://sphinxsearch.com/docs/manual-1.10.html#conf-sql-attr-multi Hopefully one of those solutions helps. Cheers -- Pat On 14/04/2011, at 9:51 AM, Eric wrote: > I have been using multiple sphinx indices per model to increase the > speed of indexing. In doing so, my attributes are spread across the > distinct index queries. > > For example: > define_index :request_first do > ... > has "null", :type => :multi, :as => :lead_user_ids > has multi_element_choices.multi_element_value_id, :type > => :multi, :as => :multi_element_value_ids > ... > end > > define_index :request_second do > ... > has program_lead(:id), :type => :multi, :as => :lead_user_ids > has "null", :type => :multi, :as => :multi_element_value_ids > ... > end > > > Then , if I query: > Request.search '', :with => {:lead_user_ids => [1, 2]} > I get results back. > > Request.search '', :with => {:multi_element_value_ids => [23, 45]} > I get results back. > > Request.search '', :with => {:lead_user_ids => [1, > 2], :multi_element_value_ids => [23, 45]} > I always get zero results back; I was under the impression that the > attributes could be spread across the models.. > > Any idea how I can preserve the performance of splitting out the > queries and get back results across indices? > > Thanks! > > --> Eric > > -- > 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. > -- 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.
