Sorry for the slow response on this... I'm not quite sure what you're asking, 
though.

If you've got a boolean column, but want a string as a field, then perhaps 
something like this will do the trick?

  indexes "IF(from_ab = 1, 'ab', '')", :as => :from_ab_string

-- 
Pat

On 15/07/2010, at 11:24 AM, gmoniey wrote:

> I have a boolean field on one of my models, and I was wondering if its
> possible to expose this field as an alias.
> 
> I want users to be able to use a word to filter by this boolean field
> as part of their search (Rather than using a checkbox). For example,
> if the boolean field was named from_ab, I was hoping I could alias
> this field to: ab so the user could search like: Adam abc
> 
> Of course, I could just add some logic in my controller to check the
> search term for this field, and add a with clause.
> 
> -- 
> 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