Hi all,
Currently, I'm trying to design a define_index bloc.
My define_index is like this
define_index do
> indexes "(SELECT creator_id FROM `articles` UNION SELECT creator_id
> FROM `documents` UNION SELECT creator_id FROM `wikis` GROUP BY creator_id
> LIMIT 0 , 30)", :as => :ts_article_creator, :facet => true
>
> # Propriete sur les recherches
> set_property :enable_star => 1
> set_property :min_prefix_len => 1
>
> end
>
I want to facetize my indexes :ts_article_creator. Without option :facet =>
true, the expected result is right.
But, in my case, it doesn't work, the result is
<pre>undefined method `(SELECT creator_id FROM `articles` UNION SELECT
creator_id FROM `documents` UNION
SELECT creator_id FROM `wikis` GROUP BY creator_id LIMIT 0 , 30)' for
#<Article:0x7e52d18></pre
>
<div id="Application-Trace" style="display: block;">
<pre><code>/opt/ree/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods
.rb:260:in `method_missing'
app/models/article.rb:351:in `method_missing'
app/controllers/searches_controller.rb:109:in `create'</code></pre>
</div>
<div id="Framework-Trace" style="display: none;">
<pre><code>/opt/ree/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods
.rb:260:in `method_missing'
vendor/plugins/thinking-sphinx/lib/thinking_sphinx/facet.rb:84:in `send'
vendor/plugins/thinking-sphinx/lib/thinking_sphinx/facet.rb:84:in
`translate'
vendor/plugins/thinking-sphinx/lib/thinking_sphinx/facet.rb:27:in `value'
vendor/plugins/thinking-sphinx/lib/thinking_sphinx/facet_collection.rb:20:in
`add_from_results'
vendor/plugins/thinking-sphinx/lib/thinking_sphinx/collection.rb:123:in
`each_with_groupby_and_count
Complete log http://pastebin.com/f5492d75c
Anyone has already do this ?
Any help will be greatly appreciate.
Best regards,
Mickaël
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---