Hi Marcel In that kind of situation, :sortable on a field isn't going to do the trick. What you'll need to do is create two attributes using SQL snippets, something like the following:
has 'LOWER(table.column)', :as => :column_ci, :type => :string has column, :as => :column_cs, :type => string And then sort by either :column_ci (case-insensitive) or :column_cs (case-sensitive). Let us know how you go :) -- Pat On 07/06/2010, at 10:01 PM, Marcel Overdijk wrote: > Hi Matt, > > I have the same use case. > > I want to be able to search both case sensitive and case insensitive > based on checkbox entered by the user. > Did you find any solution for this? > > > Regards, > Marcel > > On May 15, 7:47 pm, Matt Margolis <[email protected]> wrote: >> I have a search form where I want to allow the user to choose between >> casesensitiveand case insensitive searching over several fields on a >> model. Is there a clean way to achieve this flexibility with Sphinx/ >> ThinkingSpinx? I am new to Sphinx but it is my understanding that >> indexing is lowercased by default? >> >> Thank you, >> Matt Margolis >> >> -- >> 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 >> athttp://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. > -- 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.
