From 81dfda1597729151f74c538347d035a88a6881e6 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 21 Nov 2011 11:11:00 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20configs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/Sphinx/MysqlServer/ent.conf | 49 +++++++++++------------ config/Sphinx/MysqlServer/enttmp.conf | 41 +++++++++++++++++++ config/SphinxHisto/MysqlServer/act.conf | 17 ++++---- config/SphinxHisto/MysqlServer/dir.conf | 39 +++++++----------- config/SphinxHisto/MysqlServer/histo.conf | 18 ++++----- config/srvws02/srvws02/dir.conf | 28 ++++++------- 6 files changed, 112 insertions(+), 80 deletions(-) create mode 100644 config/Sphinx/MysqlServer/enttmp.conf diff --git a/config/Sphinx/MysqlServer/ent.conf b/config/Sphinx/MysqlServer/ent.conf index b9f7f15..0017ecf 100644 --- a/config/Sphinx/MysqlServer/ent.conf +++ b/config/Sphinx/MysqlServer/ent.conf @@ -1,41 +1,40 @@ -source source_ent +source ent { type = mysql - sql_host = 192.168.78.230 + sql_host = 192.168.3.30 sql_user = sphinx sql_pass = indexer sql_db = jo sql_query_pre = sql_query = SELECT id, siren, nic, siege, CONCAT(raisonSociale,\ -' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\ -REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\ -'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\ -REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\ -'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \ -actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \ -adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \ -FROM etablissements_tmp; - sql_attr_str2ordinal = adr_typeVoie - sql_attr_uint = siren - sql_attr_uint = nic - sql_attr_uint = siege - sql_attr_uint = adr_num - sql_attr_uint = adr_cp - sql_attr_uint = adr_dep - sql_attr_uint = actif - sql_attr_uint = cj - sql_attr_uint = sirenValide - sql_attr_uint = rang - + ' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\ + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\ + '@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\ + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\ + '@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \ + actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \ + adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \ + FROM etablissements; + sql_attr_str2ordinal = adr_typeVoie + sql_attr_uint = siren + sql_attr_uint = nic + sql_attr_uint = siege + sql_attr_uint = adr_num + sql_attr_uint = adr_cp + sql_attr_uint = adr_dep + sql_attr_uint = actif + sql_attr_uint = cj + sql_attr_uint = sirenValide + sql_attr_uint = rang } index ent { - source = source_ent + source = ent path = /dbs/sphinx/ent docinfo = extern charset_type = sbcs charset_table = 0..9, A..Z->a..z, a..z, \ -U+23, U+25, U+26, U+2B, U+3D, U+40, \ -U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF + U+23, U+25, U+26, U+2B, U+3D, U+40, \ + U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF } diff --git a/config/Sphinx/MysqlServer/enttmp.conf b/config/Sphinx/MysqlServer/enttmp.conf new file mode 100644 index 0000000..5ca1118 --- /dev/null +++ b/config/Sphinx/MysqlServer/enttmp.conf @@ -0,0 +1,41 @@ +source ent +{ + type = mysql + sql_host = 192.168.3.30 + sql_user = sphinx + sql_pass = indexer + sql_db = jo + sql_query_pre = + sql_query = SELECT id, siren, nic, siege, CONCAT(raisonSociale,\ + ' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\ + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\ + '@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\ + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\ + '@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \ + actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \ + adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \ + FROM etablissements_tmp; + sql_attr_str2ordinal = adr_typeVoie + sql_attr_uint = siren + sql_attr_uint = nic + sql_attr_uint = siege + sql_attr_uint = adr_num + sql_attr_uint = adr_cp + sql_attr_uint = adr_dep + sql_attr_uint = actif + sql_attr_uint = cj + sql_attr_uint = sirenValide + sql_attr_uint = rang + +} + +index ent +{ + source = ent + path = /dbs/sphinx/ent + docinfo = extern + charset_type = sbcs + charset_table = 0..9, A..Z->a..z, a..z, \ + U+23, U+25, U+26, U+2B, U+3D, U+40, \ + U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF +} diff --git a/config/SphinxHisto/MysqlServer/act.conf b/config/SphinxHisto/MysqlServer/act.conf index 990ea7b..619b3a4 100644 --- a/config/SphinxHisto/MysqlServer/act.conf +++ b/config/SphinxHisto/MysqlServer/act.conf @@ -1,15 +1,16 @@ source source_act { - type = mysql + type = mysql sql_host = 192.168.3.30 sql_user = sphinx sql_pass = indexer - sql_db = jo + sql_db = jo sql_query_pre = - sql_query = SELECT id, Siren1, RaisonSociale, Siren2, actif, dateLien, IF(dateUpdate>dateInsert,dateUpdate,dateInsert) as dateMaj, \ - source, Pmin*1 AS PminNum, MajMin, PpPm, IF(Pays='','FRA',Pays) AS Pays \ - FROM liens \ - WHERE ActionPart=1 AND Siren1>1000 AND Siren1 IN (SELECT DISTINCT SIREN FROM etablissements_old); + sql_query = + SELECT id, Siren1, RaisonSociale, Siren2, actif, dateLien, IF(dateUpdate>dateInsert,dateUpdate,dateInsert) as dateMaj, \ + source, Pmin*1 AS PminNum, MajMin, PpPm, IF(Pays='','FRA',Pays) AS Pays \ + FROM liens \ + WHERE ActionPart=1 AND Siren1>1000 AND Siren1 IN (SELECT DISTINCT SIREN FROM etablissements_old); sql_attr_uint = actif sql_attr_uint = source sql_attr_uint = PminNum @@ -26,6 +27,6 @@ index act morphology = none charset_type = sbcs charset_table = 0..9, A..Z->a..z, a..z, \ -U+23, U+25, U+26, U+2B, U+3D, U+40, \ -U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF + U+23, U+25, U+26, U+2B, U+3D, U+40, \ + U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF } diff --git a/config/SphinxHisto/MysqlServer/dir.conf b/config/SphinxHisto/MysqlServer/dir.conf index bd52a74..0f74f94 100644 --- a/config/SphinxHisto/MysqlServer/dir.conf +++ b/config/SphinxHisto/MysqlServer/dir.conf @@ -1,4 +1,4 @@ -source source_dir +source dir { type = mysql sql_host = 192.168.3.30 @@ -6,29 +6,21 @@ source source_dir sql_pass = indexer sql_db = jo sql_query_pre = - sql_query = SELECT id, siren, actif, \ -IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \ -CONCAT(nom,' ',naissance_nom, ' ', dirRS) AS nom, prenom, \ - YEAR(naissance_date) AS naiss_annee, \ -MONTH(naissance_date) AS naiss_mois, \ - DAY(naissance_date) AS naiss_jour, \ -naissance_lieu, adr_dep \ -FROM rncs_dirigeants; -# UNION \ -#SELECT id, siren, 0 AS actif, \ -#'' AS genre, \ -#CONCAT(nom,' ',nomUsage,' ',rs) AS nom, prenom, \ -#0 AS naiss_annee, \ -#0 AS naiss_mois, \ -#0 AS naiss_jour, \ -#'' AS naissance_lieu, 0 AS adr_dep \ -#FROM bodacc_dirigeants_histo; + sql_query = + SELECT id, siren, actif, \ + IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \ + CONCAT(nom,' ',naissance_nom, ' ', dirRS) AS nom, prenom, \ + YEAR(naissance_date) AS naiss_annee, \ + MONTH(naissance_date) AS naiss_mois, \ + DAY(naissance_date) AS naiss_jour, \ + naissance_lieu, adr_dep \ + FROM rncs_dirigeants; sql_attr_uint = naiss_annee sql_attr_uint = naiss_mois sql_attr_uint = naiss_jour - sql_attr_uint = actif - sql_attr_uint = genre - sql_attr_uint = adr_dep + sql_attr_uint = actif + sql_attr_uint = genre + sql_attr_uint = adr_dep } index dir @@ -37,9 +29,8 @@ index dir path = /dbs/sphinx/dir docinfo = extern morphology = none - #ispell_aff = /usr/local/sphinx/etc/francais.aff charset_type = sbcs charset_table = 0..9, A..Z->a..z, a..z, \ -U+23, U+25, U+26, U+2B, U+3D, U+40, \ -U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF + U+23, U+25, U+26, U+2B, U+3D, U+40, \ + U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF } diff --git a/config/SphinxHisto/MysqlServer/histo.conf b/config/SphinxHisto/MysqlServer/histo.conf index ee22bf6..407bafe 100644 --- a/config/SphinxHisto/MysqlServer/histo.conf +++ b/config/SphinxHisto/MysqlServer/histo.conf @@ -1,7 +1,7 @@ -ource histo +source histo { type = mysql - sql_host = 192.168.78.230 + sql_host = 192.168.3.24 sql_user = sphinx_histo sql_pass = sphinx sql_db = histobodacc @@ -13,11 +13,11 @@ ource histo index histo { - source = histo - path = /home/sphinx/histo - docinfo = extern - morphology = none - min_word_len = 1 - charset_type = sbcs - html_strip = 1 + source = histo + path = /home/sphinx/histo + docinfo = extern + morphology = none + min_word_len = 1 + charset_type = sbcs + html_strip = 1 } diff --git a/config/srvws02/srvws02/dir.conf b/config/srvws02/srvws02/dir.conf index 51eca0c..0f74f94 100644 --- a/config/srvws02/srvws02/dir.conf +++ b/config/srvws02/srvws02/dir.conf @@ -1,25 +1,26 @@ -source source_dir +source dir { type = mysql - sql_host = 192.168.3.24 + sql_host = 192.168.3.30 sql_user = sphinx sql_pass = indexer sql_db = jo sql_query_pre = - sql_query = SELECT id, siren, actif, \ - IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \ - CONCAT(nom,' ',naissance_nom, ' ', dirRS) AS nom, prenom, \ - YEAR(naissance_date) AS naiss_annee, \ - MONTH(naissance_date) AS naiss_mois, \ - DAY(naissance_date) AS naiss_jour, \ - naissance_lieu, adr_dep \ - FROM rncs_dirigeants; + sql_query = + SELECT id, siren, actif, \ + IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \ + CONCAT(nom,' ',naissance_nom, ' ', dirRS) AS nom, prenom, \ + YEAR(naissance_date) AS naiss_annee, \ + MONTH(naissance_date) AS naiss_mois, \ + DAY(naissance_date) AS naiss_jour, \ + naissance_lieu, adr_dep \ + FROM rncs_dirigeants; sql_attr_uint = naiss_annee sql_attr_uint = naiss_mois sql_attr_uint = naiss_jour - sql_attr_uint = actif - sql_attr_uint = genre - sql_attr_uint = adr_dep + sql_attr_uint = actif + sql_attr_uint = genre + sql_attr_uint = adr_dep } index dir @@ -28,7 +29,6 @@ index dir path = /dbs/sphinx/dir docinfo = extern morphology = none - #ispell_aff = /usr/local/sphinx/etc/francais.aff charset_type = sbcs charset_table = 0..9, A..Z->a..z, a..z, \ U+23, U+25, U+26, U+2B, U+3D, U+40, \