Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #rake task to start sphinx indexing.
- sudo rake us:in
- (in /rails_root)
- $ indexer --config 'path_to_development.conf' --all
- sh: -c: line 0: unexpected EOF while looking for matching `''
- sh: -c: line 1: syntax error: unexpected end of file
- #Here is my default.base file
- <% path = "/opt/local/var/db/sphinx/" %>
- # Indexing options
- indexer
- {
- mem_limit = 32M
- # Ultrasphinx-specific key
- delta = <%= 12.hours %>
- }
- # Daemon options
- searchd
- {
- # What interface the search daemon should listen on and where to store its logs
- address = localhost
- port = 3313
- seamless_rotate = 1
- log = <%= path %>log/searchd.log
- query_log = <%= path %>log/query.log
- read_timeout = 5
- max_children = 300
- pid_file = <%= path %>log/searchd.pid
- max_matches = 100000
- }
- # Client options
- client
- {
- # Name of the Aspell dictionary (two letters max)
- #dictionary_name = ap
- # How your application connects to the search daemon (not necessarily the same as above)
- server_host = localhost
- server_port = 3313
- }
- # Individual SQL source options
- source
- {
- sql_ranged_throttle = 0
- sql_range_step = 5000
- sql_query_post =
- }
- # Index building options
- index
- {
- path = <%= path %>
- docinfo = extern # Just leave this alone
- morphology = stem_en
- stopwords = # <%= path %>/ap-stopwords.txt
- min_word_len = 1
- # HTML-specific options
- html_strip = 0
- html_index_attrs =
- # Enable these if you need wildcard searching. They will slow down indexing significantly.
- #min_infix_len = 1
- #enable_star = 1
- charset_type = utf-8 # or sbcs (Single Byte Character Set)
- charset_table = 0..9, A..Z->a..z, -, @, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
- }
- # here is my model
- class DischargeRecord < ActiveRecord::Base
- has_many :procedures, :dependent => :destroy
- has_many :diagnoses, :dependent => :destroy
- is_indexed :fields => ['oshpd_id']
- end
- #if needed here is the generated development.conf file
- # Auto-generated at Tue Sep 02 16:40:31 -0600 2008.
- # Hand modifications will be overwritten.
- # /Users/paulsmith1/Desktop/MyRailsApps/Rigby's Healthcare Projects/oshpd_database/config/ultrasphinx/default.base
- indexer {
- mem_limit = 64M
- }
- searchd {
- read_timeout = 5
- max_children = 300
- log = /opt/local/var/db/sphinx/log/searchd.log
- port = 3313
- max_matches = 100000
- query_log = /opt/local/var/db/sphinx/log/query.log
- seamless_rotate = 1
- pid_file = /opt/local/var/db/sphinx/log/searchd.pid
- address = 0.0.0.0
- }
- # Source configuration
- source discharge_records_main
- {
- sql_range_step = 5000
- sql_query_post =
- sql_ranged_throttle = 0
- type = mysql
- sql_query_pre = SET SESSION group_concat_max_len = 65535
- sql_query_pre = SET NAMES utf8
- sql_db = oshpd_development
- sql_host = localhost
- sql_pass =
- sql_sock = /private/tmp/mysql.sock
- sql_user = root
- sql_query_range = SELECT MIN(id) , MAX(id) FROM discharge_records
- sql_query = SELECT (discharge_records.id * 1 + 0) AS id, 'DischargeRecord' AS class, 0 AS class_id, discharge_records.oshpd_id AS oshpd_id FROM discharge_records WHERE discharge_records.id >= $start AND discharge_records.id <= $end GROUP BY discharge_records.id
- sql_attr_uint = class_id
- sql_query_info = SELECT * FROM discharge_records WHERE discharge_records.id = (($id - 0) / 1)
- }
- # Index configuration
- index main
- {
- source = discharge_records_main
- charset_type = utf-8
- html_index_attrs =
- charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
- min_word_len = 1
- # enable_star = 1
- stopwords =
- html_strip = 0
- path = /opt/local/var/db/sphinx//sphinx_index_main
- docinfo = extern
- morphology = stem_en
- # min_infix_len = 1
- }
Add Comment
Please, Sign In to add comment