From fb43745934e4646bffb32a97e589e780e527ddb6 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 21 Nov 2011 11:08:28 +0000 Subject: [PATCH] Ajout fichier en developpement --- config/Sphinx/Dev/act.conf | 32 +++++++++++++++++++++++++++ config/Sphinx/Dev/dir.conf | 36 ++++++++++++++++++++++++++++++ config/Sphinx/Dev/ent.conf | 40 ++++++++++++++++++++++++++++++++++ config/Sphinx/Dev/enttmp.conf | 41 +++++++++++++++++++++++++++++++++++ config/Sphinx/Dev/histo.conf | 23 ++++++++++++++++++++ 5 files changed, 172 insertions(+) create mode 100644 config/Sphinx/Dev/act.conf create mode 100644 config/Sphinx/Dev/dir.conf create mode 100644 config/Sphinx/Dev/ent.conf create mode 100644 config/Sphinx/Dev/enttmp.conf create mode 100644 config/Sphinx/Dev/histo.conf diff --git a/config/Sphinx/Dev/act.conf b/config/Sphinx/Dev/act.conf new file mode 100644 index 0000000..0b64120 --- /dev/null +++ b/config/Sphinx/Dev/act.conf @@ -0,0 +1,32 @@ +source source_act +{ + type = mysql + sql_host = 192.168.78.230 + sql_user = sphinx + sql_pass = indexer + 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_attr_uint = actif + sql_attr_uint = source + sql_attr_uint = PminNum + sql_attr_str2ordinal= MajMin + sql_attr_str2ordinal= PpPm + sql_attr_str2ordinal= Pays +} + +index act +{ + source = source_act + path = /dbs/sphinx/act + docinfo = extern + 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 +} diff --git a/config/Sphinx/Dev/dir.conf b/config/Sphinx/Dev/dir.conf new file mode 100644 index 0000000..609fb58 --- /dev/null +++ b/config/Sphinx/Dev/dir.conf @@ -0,0 +1,36 @@ +source dir +{ + type = mysql + sql_host = 192.168.78.230 + 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_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 +} + +index dir +{ + source = source_dir + path = /dbs/sphinx/dir + docinfo = extern + 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 +} diff --git a/config/Sphinx/Dev/ent.conf b/config/Sphinx/Dev/ent.conf new file mode 100644 index 0000000..3c1347c --- /dev/null +++ b/config/Sphinx/Dev/ent.conf @@ -0,0 +1,40 @@ +source ent +{ + type = mysql + sql_host = 192.168.78.230 + 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; + 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/Sphinx/Dev/enttmp.conf b/config/Sphinx/Dev/enttmp.conf new file mode 100644 index 0000000..609cf1d --- /dev/null +++ b/config/Sphinx/Dev/enttmp.conf @@ -0,0 +1,41 @@ +source ent +{ + type = mysql + sql_host = 192.168.78.230 + 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/Sphinx/Dev/histo.conf b/config/Sphinx/Dev/histo.conf new file mode 100644 index 0000000..063282c --- /dev/null +++ b/config/Sphinx/Dev/histo.conf @@ -0,0 +1,23 @@ +source histo +{ + type = mysql + sql_host = 192.168.78.230 + sql_user = sphinx_histo + sql_pass = sphinx + sql_db = histobodacc + sql_port = 3306 # optional, default is 3306 + sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr; + sql_attr_uint = annee1 + sql_query_info = SELECT * FROM bodacc_ocr WHERE id=$id +} + +index histo +{ + source = histo + path = /home/sphinx/histo + docinfo = extern + morphology = none + min_word_len = 1 + charset_type = sbcs + html_strip = 1 +}