Hi Steven

You could probably do that with index weightings. Try the following  
(assuming you're using delta indexes):

   ThinkingSphinx::Search.search params[:query],
     :classes       => [Article, Term],
     :limit         => 1_000_000,
     :page          => params[:page] || 1,
     :per_page      => 20,
     :index_weights => {
       "article_core"  => 100,
       "article_delta" => 100,
     }

Cheers

-- 
Pat

On 28/03/2009, at 9:03 AM, Steven Garcia wrote:

>
> Howdy Sphinxsters
>
> So I've managed to search two models with successful results like so:
>
> @results = ThinkingSphinx::Search.search( params[:query],
>      :classes => [Article,Term],
>      :limit => 1000000,
>      :page => params[:page] || 1,
>      :per_page => 20,
>      :field_weights => { :title => 20 }
>    )
>
> I am hitting a wall now as I'd like for Articles to always be at the
> top of my search results, followed by Terms.
>
> The problem is that both models have a :title attribute - I suppose I
> could change one of them but was wondering if there was a standard way
> to weight an entire model against another as I couldnt find any
> indication in the docs
>
> Thanks in advance
>
> >


--~--~---------~--~----~------------~-------~--~----~
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