Hmm, perhaps there's a bug with string attribute facets - or maybe Sphinx 
doesn't like grouping by them, I'm not sure.

As for your workaround - it looks like the first attempt the number was too big 
to be an integer, which would have caused problems. As for putting in random 
values, I'm a little surprised that works, as grouping by them would return 
everything in the one facet.

-- 
Pat

On 08/09/2011, at 9:11 AM, rbjarnason wrote:

> OK. Its working now :)
> 
> Changed the "fake" facet line in the product model to:
>    has "3380102624", :as => :product_name_facet, :type=>:integer
> 
> Where that fake integer number is a crc32 of a garbage random text
> string.  Actually I think that the other larger fake integer number in
> the previous post was also working but my cap deploy script was not
> doing a full ts rebuild.
> 
> Do you think that this fake facet attribute can cause any unexpected
> problems?
> 
> So the fix is that in 2.0.2 you need symmetrical facet attributes in
> all models that are a part of the search.
> 
> Best regards,
> Robert
> 
> On Sep 7, 5:52 pm, rbjarnason <[email protected]> wrote:
>> More info:
>> 
>> In production.sphinx.conf then this is defined here:
>>   sql_attr_uint = product_name_facet
>> 
>> This facet was only setup for documents related to the product but I
>> tried now to add a dummy attribute into the product model itself with
>> a random integer number like this:
>>   has "75676575675635435434", :as
>> => :product_name_facet, :type=>:integer
>> 
>> This did not help.
>> 
>> R.
>> 
>> On Sep 7, 5:21 pm, rbjarnason <[email protected]> wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Also to add, here is the facets query line I use:
>>> @search_results = @facets.for(:product_name=>params[:product_name])
>> 
>>> R.
>> 
>>> On Sep 7, 11:29 am, rbjarnason <[email protected]> wrote:
>> 
>>>> Forgot to add that all the facet options show up correctly after the
>>>> search, just when you click on the individual facets links it crashes.
>> 
>>>> R.
>> 
>>>> On Sep 7, 11:10 am, rbjarnason <[email protected]> wrote:
>> 
>>>>> Hi,
>> 
>>>>> I've upgraded to Sphinx 2.0.2-DEV and it works great except that
>>>>> Facets don't work.
>> 
>>>>> Here is the output from the Sphinx daemon:
>>>>> Sphinx (0.075597s)   Found  results
>>>>> Sphinx   Sphinx Daemon returned error: no such filter attribute
>>>>> 'product_name_facet'
>> 
>>>>> Any idea what could be causing this, I am using the latest TS from
>>>>> github as a plugin.
>> 
>>>>> Best regards,
>>>>> Robert
> 
> -- 
> 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