OK.
This is now installed: Sphinx 2.2.10-id64-release (2c212e0)
I did not set `ThinkingSphinx::SphinxQL.variables!`
@facets = Product.is_product_visible.is_created.facets @keyword_string,
:order => "sphinx_internal_group ASC", :with => ts_filters
and I get:
Using the old-fashion @variables (@count, @weight, etc.) is deprecated -
SELECT *, @groupby, @count FROM `product_core`
I dont use @weight anymore...
On Thursday, February 18, 2016 at 1:14:03 PM UTC+1, Pat Allan wrote:
>
> Ah, perhaps you’re using an old version of Sphinx, and calling
> `ThinkingSphinx::SphinxQL.variables!` somewhere? Try @groupby and @count
> instead.
>
> Cheers
>
> —
> Pat
>
> On 18 Feb 2016, at 10:55 PM, Treeninja <[email protected] <javascript:>>
> wrote:
>
> Hi Pat!
>
> Thank you for your answer. Now I get
>
> index product_core: sort-by attribute 'sphinx_internal_group' not found
>
> Should I add something to index definition?
>
> Regards, Miha
>
> On Thursday, February 18, 2016 at 12:33:33 PM UTC+1, Pat Allan wrote:
>>
>> Hi Miha
>>
>> If you want all facets sorted the same way, then you can use the :order
>> option and sort either by sphinx_internal_group (the facet key values) or
>> sphinx_internal_count (the number of results for a facet key) ASC/DESC.
>>
>> Product.is <http://product.is/>_product_visible.is_created.facets
>> @keyword_string, :order => ‘sphinx_internal_group ASC’, :with => ts_filters
>>
>> However, if you only want some facets sorted a specific way, then I’m
>> afraid you’re best served by assigning the sorted values (as you’re
>> computing in your example) as new objects, instead of trying to modify the
>> TS facet search results.
>>
>> Cheers
>>
>> —
>> Pat
>>
>> On 18 Feb 2016, at 10:15 PM, Treeninja <[email protected]> wrote:
>>
>> Hi!
>>
>> I've migrated to TS 3.1.4 and have problem with facets sorting.
>>
>> I am using this:
>>
>> @facets = Product.is
>> <http://product.is/>_product_visible.is_created.facets
>> @keyword_string, :order => (order), :with => ts_filters
>> @facets[:industry_id] = Hash[@facets[:industry_id].sort]
>> @facets[:country_id]= Hash[@facets[:country_id].sort]
>>
>> Error is:
>>
>> undefined method `[]=' for #<ThinkingSphinx::FacetSearch:0x0000000d879ee0>
>>
>> How can i properly sort facets?
>>
>> Thanks.
>>
>> Best regards, Miha
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Thinking Sphinx" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/thinking-sphinx.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> Visit this group at https://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.