How to Allow Special Characters(#,@,!,&,(,),%) as search keyword in Sphinx -


i have got struck implementation of allowing special characters(#,@,!,&,(,),%) search keyword in sphinx..

please suggest me..

below config file,

/* starts */

source dbserver {     type                    =   mysql     sql_host                =   localhost     sql_user                =   root     sql_pass                =        sql_db                  =   mydb     #sql_sock               =   /var/run/mysqld/mysqld.sock     sql_port                =   3306  }   searchd {     listen                  =   localhost:3312     # port                  =   9313     log                     =                       /* searchd.log path */     query_log               =                   /* query.log path */     pid_file                =                   /* searchd.pid path */     max_matches             =   10000     seamless_rotate         =   0 }   source  adsearch : mydbserver {     sql_query_post          = replace sph_tracker select 1,'ad',current_timestamp;      sql_ranged_throttle     = 1     sql_attr_uint           = networkid     sql_attr_uint           = folderid     sql_attr_uint           = createdby     sql_attr_uint           = status     sql_attr_timestamp      = createdon }  index index_adsearch {     source                  = adsearch     path                    =           /* path */     morphology              = stem_en     min_word_len            = 0     #min_prefix_len         = 5     min_infix_len           = 2     enable_star             = 1     preopen                 = 1 }  source delta_adsearch : adsearch {     sql_query   = delete ad status='deleted' , deleteflag='y'                               }  index delta_index_adsearch : index_adsearch {     source                  = delta_adsearch     path                    =               /* path */ }  source  tmplsearch : mydbserver {      sql_query_post         = replace sph_tracker select 2,'template',current_timestamp;       sql_ranged_throttle     = 1     sql_attr_uint           = networkid     sql_attr_uint           = industryid     sql_attr_uint           = status     sql_attr_timestamp      = createdon     sql_attr_timestamp      = startdate     sql_attr_timestamp      = enddate     sql_attr_uint           = active     sql_attr_uint   = primarysize }  index index_tmplsearch {     source                  = tmplsearch     path                    =               /* path */     morphology              = stem_en     min_word_len            = 0     #min_prefix_len         = 5     min_infix_len           = 2     enable_star             = 1     preopen                 = 1 }  source delta_tmplsearch : tmplsearch {     sql_query   = delete adtemplate status='deleted' , deleteflag='y'                               }  index delta_index_tmplsearch : index_tmplsearch {     source                  = delta_tmplsearch     path                    =               /* path */ }   source  media_assets_search : mydbserver {        #sql_query_post         = replace sph_tracker select 3,'media',current_timestamp;      sql_ranged_throttle     = 1     sql_attr_uint           = networkid     sql_attr_uint           = mediatype     sql_attr_uint           = mediacat     sql_attr_uint           = uploadedby     sql_attr_uint           = active         sql_attr_uint           = industryid             sql_attr_timestamp      = uploaddate     sql_attr_uint           = diskstore }  index index_media_assets_search {     source                  = media_assets_search     path                    =               /* path */     morphology              = stem_en     min_word_len            = 0     #min_prefix_len         = 5     min_infix_len           = 2     enable_star             = 1     preopen                 = 1 }  source delta_media_assets_search : media_assets_search {  }  index delta_index_media_assets_search : index_media_assets_search {     source                  = delta_media_assets_search     path                    =                   /* path */ } 

/* ends */

please have @ , suggest me..

thanks,

nagu..

you need add them charset_table config.

you may want make sure escape query avoid being misinterpreted search syntax.

while there read on blend_chars


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -