Ah, some of these things might be related to switching from mysql to postgres...
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
#1 Posted by Nico on 16 Aug, 2011 12:00 PM
Ah, some of these things might be related to switching from mysql to postgres...
#2 Posted by Pat Allan Support staff on 16 Aug, 2011 12:02 PM
Yup - if you get stuck with it, I'm happy to provide suggestions - though sharing your define_index block will certainly help with that :)
#3 Posted by Nico on 16 Aug, 2011 01:17 PM
Ah, I see, I need to add some group_bys... trying that now ;-)
#4 Posted by Nico on 16 Aug, 2011 01:30 PM
Okay, all works now, except this line in the job model's index:
has 'CRC32(country_string)', :as => :country_for_filtering, :type => :integer
'indexing index 'job_core'... ERROR: index 'job_core': sql_range_query: ERROR: function crc32(character varying) does not exist
LINE 1: ..."name", '') AS "job_name_sort", 1 AS "activated", CRC32(coun...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(DSN=pgsql://lisuxygdfr:***@127.0.0.1:10323/lisuxygdfr). total 0 docs, 0 bytes
total 0.056 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'job_delta'...
ERROR: index 'job_delta': sql_range_query: ERROR: function crc32(character varying) does not exist
LINE 1: ..."name", '') AS "job_name_sort", 1 AS "activated", CRC32(coun...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(DSN=pgsql://lisuxygdfr:***@127.0.0.1:10323/lisuxygdfr).'
#5 Posted by Nico on 16 Aug, 2011 01:32 PM
Hmm I will have to find a workaround for that crc32 thing. However, when I take it out,
I get the following error when searching with thinking sphinx:
Sphinx Sphinx Daemon returned error: no such filter attribute 'user_id'
Here is the user's index definition:
define_index do
end
#6 Posted by Nico on 16 Aug, 2011 04:09 PM
Okay, fixed the last issue. Instead of using crc32 I simply assign an int to each country for filtering.
#7 Posted by Nico on 16 Aug, 2011 04:10 PM
Can you close the discussion? I can't.
#8 Posted by Pat Allan Support staff on 17 Aug, 2011 06:03 AM
Consider it closed - great to hear you got it all sorted.
Pat Allan closed this discussion on 17 Aug, 2011 06:03 AM.