I think it's a limit in Sphinx itself - you can sort by @random, *OR* by 
attributes etc, but @random can only be used by itself.
http://stackoverflow.com/questions/6466657/randomize-search-result-in-sphinx

Cheers

-- 
Pat

On 29/06/2012, at 2:07 PM, Abdo Achkar wrote:

> Hello :-)
> 
> I'm attempting to return results ordered by "has_images" first, and then 
> @random.
> 
> I tried the following syntaxes:
> 
> :order => "has_images DESC, @random"
> :order => "has_images DESC, @random DESC"
> :order => "@random + ( has_images * 1000000.0 ) DESC"
> 
> The first two syntaxes give Sphinx Daemon returned error: index 
> location_core,location_delta: sort-by attribute '@random' not found
> and the third syntax causes the whole set to be sorted randomly
> 
> Note that :order => "has_images DESC" works.
> 
> Is this something that Sphinx can't do or am I missing something?
> 
> Best regards,
> A
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/thinking-sphinx/-/WNL5ZuCJaP0J.
> 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