On Saturday, August 4, 2012 1:24:39 PM UTC-3, Pat Allan wrote:

> Hi Luis
>
> Sorry for not responding sooner. Unfortunately, I can't think of any way 
> to do this - there's no way to refer to other indices or have subqueries 
> within queries. Not saying what you want to do is impossible… but 
> certainly, I've no idea how to do it.
>
>
Thank you Pat,

I figure out a workaround by using Facets tags(:id) on the post:

class Post
  define_index do
    # ...
    has tags(:id), :as => :tag_ids, :type => :multi
  end
end

And combined with some scopes, I was able to retrieve the accumulated 
tag_ids from it.

But, while I got the results from Sphinx pretty fast, iterating over search 
bundle and collecting the counters takes considerable amount of time, 
leaving me in the same situation as first scenario.

I'm thinking use a C extension to iterate over the search results and 
extract the sphinx attributes, but haven't figure out all the details yet.

Perhaps there is a way to collect these sphinx attributes without looping 
through? maybe use Riddle directly instead?

While looking into this, some colleagues comment to me that ElasticSearch 
gives you indexed terms ordered by usage when you do a query, but those 
terms can't be paginated (which is something I need too).

I'll keep investigating into this and if I find an alternative will post it 
here for others.

Thank you again for your time,
--
Luis Lavena

-- 
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/-/dyfIrSkUj60J.
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