I put regexp_matches in double quotes so it become: indexes "regexp_matches(callid,'\^\[0-9\]\*')", :as => :phone
now it seems to work, thank you again. On Friday, May 24, 2013 12:50:48 PM UTC+4, Дмитрий Карбышев wrote: > > You are totally right, i tried to remove this definition and everything > works without it! > i'm using postgres and regexp_matches is posgres function, that can be > used direcly in console as other sql terms, so i thought that it will > work... > > On Friday, May 24, 2013 12:37:12 PM UTC+4, Pat Allan wrote: >> >> The issue is very likely this line: >> >> indexes regexp_matches(callid,'\^\[0-9\]\*'), :as => :phone >> >> Index definitions are translated to SQL statements, so you're not able to >> call methods - especially not methods expected to occur within the scope of >> each instance. >> >> You could translate this line to use a SQL snippet instead, or perhaps >> the regex translation isn't even required? >> >> -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
