158 lines
5.2 KiB
Plaintext
158 lines
5.2 KiB
Plaintext
|
|
source ciblage
|
|
{
|
|
type = mysql
|
|
sql_host = ENV_MYSQLHOST
|
|
sql_port = 3306
|
|
sql_user = ENV_MYSQLUSER
|
|
sql_pass = ENV_MYSQLPASS
|
|
sql_db = jo
|
|
sql_query_pre = SET NAMES utf8
|
|
sql_query = \
|
|
SELECT id, LPAD(siren, 9, '0') AS siren, LPAD(nic, 5, '0') AS nic, \
|
|
siege, \
|
|
adr_cp, \
|
|
REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
|
IF(tel>0,1,0) AS tel, \
|
|
IF(fax>0,1,0) AS fax, \
|
|
cj, \
|
|
capital, \
|
|
CONCAT('EX ', ape_etab) AS ape_etab, \
|
|
CONCAT('EX ', ape_entrep) AS ape_entrep, \
|
|
age_entrep, \
|
|
age_etab, \
|
|
IF(tca IS NULL,99,tca) AS tca, \
|
|
tcaexp, \
|
|
IF(teff_entrep IS NULL,99,teff_entrep) AS teff_entrep, \
|
|
IF(teff_etab IS NULL,99,teff_etab) AS teff_etab, \
|
|
IF(web='',0,1) AS web, \
|
|
IF(mail='',0,1) AS mail, \
|
|
IF(adrDom>0,1,0) AS adrDom, \
|
|
actifEco, \
|
|
presentRcs, \
|
|
procolHisto, \
|
|
tvaIntraValide, \
|
|
dateCrea_etab,\
|
|
dateCrea_ent, \
|
|
dateImmat, \
|
|
eff_entrep, \
|
|
eff_etab, \
|
|
IF(dirNom='',0,1) AS dirNom, \
|
|
nbEtab, \
|
|
IF(nbMPubli>0,1,0) AS nbMPubli, \
|
|
IF(CAST(sirenGrp AS UNSIGNED)>100,1,0) AS sirenGrp, \
|
|
nbActio, \
|
|
IF(nbActio>0,1,0) AS actio, \
|
|
nbPart, \
|
|
IF(nbPart>0,1,0) AS part, \
|
|
CASE bilType WHEN 'I' THEN 1 WHEN 'R' THEN 2 WHEN 'E' THEN 3 ELSE 0 END as bilType, \
|
|
bilAnnee, \
|
|
bilCloture, \
|
|
bilDuree, \
|
|
bilTca, \
|
|
bilEE, \
|
|
bilFL, \
|
|
bilFK, \
|
|
bilFR, \
|
|
bilGF, \
|
|
bilGP, \
|
|
bilGU, \
|
|
bilGW, \
|
|
bilHD, \
|
|
bilHH, \
|
|
bilHL, \
|
|
bilHM, \
|
|
bilHN, \
|
|
bilYP, \
|
|
CAST(codeCommune AS UNSIGNED) AS codeCommune, \
|
|
CASE zus WHEN '' THEN 0 WHEN 'HORSZONE' THEN 0 WHEN 'NSP' THEN 0 WHEN 'X' THEN 0 ELSE 1 END as zus, \
|
|
CASE zfu WHEN '' THEN 0 WHEN 'HORSZONE' THEN 0 WHEN 'NSP' THEN 0 WHEN 'X' THEN 0 ELSE 1 END as zfu, \
|
|
CASE zru WHEN '' THEN 0 WHEN 'NSP' THEN 0 ELSE 1 END as zru, \
|
|
CASE cucs WHEN '' THEN 0 WHEN 'NSP' THEN 0 ELSE 1 END as cucs, \
|
|
IF(zrr=1,1,0) as zrr, \
|
|
IF(zafr=1,1,0) as zafr, \
|
|
CASE avisCs WHEN 0 THEN 1 WHEN 10 THEN 2 WHEN 15 THEN 3 WHEN 23 THEN 4 WHEN 29 THEN 4 WHEN 39 THEN 4 WHEN 43 THEN 4 WHEN 21 THEN 5 WHEN 26 THEN 5 WHEN 28 THEN 5 WHEN 31 THEN 6 WHEN 50 THEN 6 WHEN 24 THEN 7 ELSE 0 END as avisCs \
|
|
FROM etablissements_act WHERE siren>100;
|
|
|
|
sql_field_string = siren
|
|
sql_field_string = nic
|
|
sql_attr_bool = siege
|
|
sql_attr_uint = adr_cp
|
|
sql_attr_uint = adr_dep
|
|
sql_attr_bool = tel
|
|
sql_attr_bool = fax
|
|
sql_attr_uint = cj
|
|
sql_attr_uint = capital
|
|
sql_attr_uint = age_entrep
|
|
sql_attr_uint = age_etab
|
|
sql_attr_uint = tca
|
|
sql_attr_uint = tcaexp
|
|
sql_attr_uint = teff_entrep
|
|
sql_attr_uint = teff_etab
|
|
sql_attr_bool = web
|
|
sql_attr_bool = mail
|
|
sql_attr_bool = adrDom
|
|
sql_attr_uint = actifEco
|
|
sql_attr_uint = presentRcs
|
|
sql_attr_uint = procolHisto
|
|
sql_attr_uint = tvaIntraValide
|
|
sql_attr_uint = dateCrea_etab
|
|
sql_attr_uint = dateCrea_ent
|
|
sql_attr_uint = dateImmat
|
|
sql_attr_uint = eff_entrep
|
|
sql_attr_uint = eff_etab
|
|
sql_attr_bool = dirNom
|
|
sql_attr_uint = nbEtab
|
|
sql_attr_uint = nbMPubli
|
|
sql_attr_bool = sirenGrp
|
|
sql_attr_uint = nbActio
|
|
sql_attr_bool = actio
|
|
sql_attr_uint = nbPart
|
|
sql_attr_bool = part
|
|
sql_attr_uint = bilType
|
|
sql_attr_uint = bilAnnee
|
|
sql_attr_uint = bilCloture
|
|
sql_attr_uint = bilDuree
|
|
sql_attr_uint = bilTca
|
|
sql_attr_uint = bilEE
|
|
sql_attr_uint = bilFL
|
|
sql_attr_uint = bilFK
|
|
sql_attr_uint = bilFR
|
|
sql_attr_uint = bilGF
|
|
sql_attr_uint = bilGP
|
|
sql_attr_uint = bilGU
|
|
sql_attr_uint = bilGW
|
|
sql_attr_uint = bilHD
|
|
sql_attr_uint = bilHH
|
|
sql_attr_uint = bilHL
|
|
sql_attr_uint = bilHM
|
|
sql_attr_uint = bilHN
|
|
sql_attr_uint = bilYP
|
|
sql_attr_uint = codeCommune
|
|
sql_attr_bool = zus
|
|
sql_attr_bool = zru
|
|
sql_attr_bool = zfu
|
|
sql_attr_bool = cucs
|
|
sql_attr_bool = zrr
|
|
sql_attr_bool = zafr
|
|
sql_attr_uint = avisCs
|
|
}
|
|
|
|
index ciblage
|
|
{
|
|
source = ciblage
|
|
path = /var/lib/sphinxsearch/idx/ciblage
|
|
docinfo = extern
|
|
morphology = none
|
|
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
U+C0->a, U+C1->a, U+C2->a, U+C3->a, U+C4->a, U+C5->a, U+C6->a, U+C7->c, \
|
|
U+C8->e, U+C8->e, U+C9->e, U+CA->e, U+CB->e, U+CC->i, U+CD->i, U+CE->i, \
|
|
U+CF->i, U+D0->d, U+D1->n, U+D2->o, U+D3->o, U+D4->o, U+D5->o, U+D6->o, \
|
|
U+D8->o, U+D9->u, U+DA->u, U+DB->u, U+DC->u, U+DD->y, U+E0->a, U+E1->a, \
|
|
U+E2->a, U+E3->a, U+E4->a, U+E5->a, U+E7->c, U+E8->e, U+E9->e, U+EA->e, \
|
|
U+EB->e, U+EC->i, U+ED->i, U+EE->i, U+EF->i, U+F1->n, U+F2->o, U+F3->o, \
|
|
U+F4->o, U+F5->o, U+F6->o, U+F8->o, U+F9->u, U+FA->u,U+FB->u, U+FC->u, \
|
|
U+FD->y, U+FF->y, U+0152->U+0153, U+0153
|
|
}
|