Heya Andy

It's certainly possible - but it's worth noting that this will load every 
single index definition, which can be expensive - especially in the development 
environment when you're paying that load price on every request:

  indices = ThinkingSphinx::IndexSet.new options[:classes], options[:indices]
  indices.collect(&:facets).flatten.collect &:name

The options mentioned above are what you'd pass in for a search, should you 
want to limit the set of indices/facets. Both are required parameters, but can 
be nil.

Cheers

-- 
Pat

On 15 Oct 2014, at 6:41 am, [email protected] wrote:

> Hello!
> 
> I have several indexed models with various facets here and there.  I'd like 
> to get a list of all the facets so I can tell my controller to allow those 
> parameters through, strong-parameters style.
> 
> Currently I'm specify them by hand in the controller but I was wondering 
> whether there was a neater way to do this.
> 
> Thanks in advance,
> 
> Andy Stewart
> 
> -- 
> 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 http://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 http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to