Hi Piotr

Ideally, your original approach - using chosen_radio_features(:id) -  
should do the trick, and it shouldn't generate errors. It will also  
add the sql_attr_multi definition to the configuration file.

So, we should try to figure out why it isn't working, though. Can you  
put your original error-generating config onto gist?

As a work-around, you can edit the config file manually, and then when  
you index, you'll need to set the INDEX_ONLY environment variable as  
well, to ensure the file isn't overwritten:

rake ts:in INDEX_ONLY=true

Of course, should you make changes to your config via ruby later,  
you're going to have to overwrite the file and re-apply your custom  
edit.

Cheers

-- 
Pat

On 15/02/2009, at 7:21 PM, Piotr Sarnacki wrote:

>
> I had some time to play with it and probably the best way is to add
> sql_attr_multi definition to config file. I've added it 
> http://gist.github.com/64643
> and it even works! :)
>
> The funny thing is that I always feared sphinx's config, stayed out of
> it and prayed that Riddle/TS has needed config generation features ;-)
> It seems that it's not as hard as it seems, but you have to give it a
> chance (yeah, I know it's pretty obvious, but everything is obvious
> when you know it ;-).
>
> The only thing that left is to add this part of config file each time
> config is generated. At the moment every ts:config or ts:index run is
> generating standard config from define_index block overwriting my
> changes. Is there any way to inject it to config file while
> generating? I can't find it in the docs...
>
> Cheers
>
>
> On Feb 14, 11:48 am, Piotr Sarnacki <[email protected]> wrote:
>> Hi,
>>
>> I have to get some records with pretty complex query. It's only for
>> sphinx so I use has_many with :finder_sql option:http://gist.github.com/64335
>>
>> With this collection and has choosen_radio_features(:id), :as
>> => :feature_ids generated config contains some errors and there is no
>> DISTINCT option anywhere - probably TS does not use finder_sql.
>>
>> What is the proper way to get such indexes?
> >


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