Thanks for your answer!

In the sphinx docs (http://www.sphinxsearch.com/docs) some internal
sorting modes are mentioned in the section "SPH_SORT_EXTENDED mode"
one of which is named @random and returns results in random order.
Isn't it possible to apply this sorting mode with thinking sphinx?

Otherwise I'll use the approach you described, but I'll have to
increase the maximum number of matches as it seems to be below 500 by
default.

Best regards


On 1 Jun., 01:25, Pat Allan <p...@freelancing-gods.com> wrote:
> Sphinx doesn't have anything like that, unfortunately - it sounds like  
> something that's better done by the database, to be honest.
>
> If you need *search* results randomly returned, I guess you could  
> request a really big page (:per_page => 1000), and then generate  
> random numbers to pick specific requests out. And, to keep it cleaner,  
> use search_for_ids, so you're not instantiating a massive amount of  
> records.
>
> --
> Pat
>
> On 31/05/2009, at 3:40 PM, tilt wrote:
>
>
>
> > Hi,
>
> > I'd like to select a certain number of random results with thinking
> > sphinx.
>
> > Does anybody know how thinking sphinx translates the @random
> > attribute? Is it possible to use sth similar to :order => "Rand()" in
> > our query?
>
> > Thanks for your help!
>
> > Best regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to thinking-sphinx@googlegroups.com
To unsubscribe from this group, send email to 
thinking-sphinx+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to