Hi Abdo

You can specify index weights, which may help prioritise location results above 
location_partial:

  Location.search 'foo', :index_weights => {
    'location_core' => 5, 'location_partial_core' => 1
  }

Cheers

-- 
Pat

On 21/12/2012, at 4:41 PM, Abdo Achkar wrote:

> Hello,
> 
> Having a good day? :-)
> 
> I'm using multiple indexes for my model "Location".
> 
> I have a define_index "location" and define_index "location_partial".
> I use the "location_partial" index for autocompletion and is more
> lightweight than the "location_core" index.
> 
> My search used "location_core" as its default index prior to a recent
> update of thinking_sphinx (Sorry, I don't remember the versions).
> 
> Now, when I use Location.search, it seems it's returning the search
> results that are similar to the ones returned using :index =>
> "location_partial". When I do Location.search ... :index =>
> "location", I get my expected results.
> 
> I tried changing the order or define_index, it did not affect the
> result: the default was always "location_partial".
> 
> Commenting out define_index "location_partial" allowed "location" to
> be the default index.
> 
> Is there a way to specify the default index? I tired aliasing the
> search method but apparently you use :method_missing
> 
> Thank you very much!
> 
> -- 
> 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.

Reply via email to