I write the following code at the Businesslisting model define_index do index business_name, :sortable=>true index service index description index district.ename, :as=>:district_name end
-----------Controller Code Businesslisting.search params[:keywords], :select=>"business_name,email,telephone" On 11/25/10, surbhi gupta <[email protected]> wrote: > Thanks James. Search is now working for Devanagari characters as well. > > Regards, > Surbhi > > > On Wed, Nov 24, 2010 at 8:42 PM, James Healy <[email protected]> wrote: > >> Surbhi wrote: >> > Do we need to do something special to search keywords having >> > Devanagari characters? >> > >> > I am trying to search for a keyword "इंग्लिश" (which Hindi language is >> > "English"). The search returns all the records of the model being >> > searched (records matching and not matching the keyword) >> >> You'll need to add the unicode codepoints for the Devanagari characters >> to your charset_table option sphinx.yml. By default only english >> characters are indexed and everything else is treated as whitespace. >> >> See [1] for my blog post discussing charset_table. In addition to the >> options I suggest there, you'll want to add something like: >> >> "U+XXXX, U+XXXX, U+XXXX, U+XXXX" >> >> to it, where each U+XXXX is a character you want to be indexed. >> >> cheers >> >> -- James Healy <[email protected]> Thu, 25 Nov 2010 02:09:50 +1100 >> >> [1] http://yob.id.au/2008/05/08/thinking-sphinx-and-unicode.html >> > > -- > 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.
