Great to hear multiple indexes are fully supported. Do you if there is an example somewhere on the internet?
Is it also possible to define the charset_table per index? The case insensitive index will need something like A-Z->a-z but the case insensitive not. On Jun 8, 1:32 pm, Pat Allan <[email protected]> wrote: > Multiple indexes are supported, just not documented. You need to give all > indexes (except for the first) an explicit name: > > define_index "foo" do > # ... > end > > And sorry, I misunderstood - for *searching* on case sensitive/insensitive, > multiple indexes is definitely the approach you'll need to follow. > > -- > Pat > > On 08/06/2010, at 8:32 PM, Marcel Overdijk wrote: > > > > > Hi Pat, > > > I was thinking about using multiple indexes. 1 case insensitive (all > > lower case chars) and 1 for case sensitive. > > > But I don't the status about defining multiple indexes in TS (it's not > > in the docs at least). > > And would it be possible then to define the charset_table per index? > > > I'm also not sure if the sort option works in our case. Let me > > explain.... > > > What we currently do is based on a defined sphinx query (q) check if > > that query is valid for the given article. > > We use this to autotag our article database. > > > def matches?(q, article) > > return false if keywords.blank? > > results = Article.search(q, :with => { :article_id => > > article.id }, :match_mode => :extended) > > results.length > 0 > > end > > > Now the problem is sometimes we want to explicitly search case > > sensitive and sometimes case insensitive. > > > On Jun 7, 2:16 pm, Pat Allan <[email protected]> wrote: > >> 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 > >>> 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 > > 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.
