Ajout config et explication ciblage
This commit is contained in:
parent
70c67fa13f
commit
3044222751
207
config/Sphinx/Dev/ciblage.conf
Normal file
207
config/Sphinx/Dev/ciblage.conf
Normal file
@ -0,0 +1,207 @@
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Documentation
|
||||
# =============
|
||||
#
|
||||
# Présence d'éléments
|
||||
# IF(element=='',0,1) AS pElement
|
||||
#
|
||||
# Liste des champs dans la BDD
|
||||
# -----------------------------
|
||||
# id
|
||||
# source
|
||||
# source_id
|
||||
# triCode
|
||||
# autre_id
|
||||
# siren => LPAD(siren, 9, '000000000')
|
||||
# nic => LPAD(nic, 5, '00000')
|
||||
# actif => 0 ou 1
|
||||
# siege => 0 ou 1
|
||||
# raisonSociale
|
||||
# enseigne
|
||||
# sigle
|
||||
# identite_pre
|
||||
# marques => IF(marques=='',0,1) AS pMarques
|
||||
# adr_num
|
||||
# adr_btq
|
||||
# adr_typeVoie
|
||||
# adr_libVoie
|
||||
# adr_comp
|
||||
# adr_cp => Code postal
|
||||
# adr_ville => Ville
|
||||
# adr_dep => Departement (Corse 2A,2B => 201, 202)
|
||||
# adr_com
|
||||
# tel => IF(tel=='0000000000',0,1) AS pTel
|
||||
# fax => IF(fax=='0000000000',0,1) AS pFax
|
||||
# cj => Texte
|
||||
# capital => Float
|
||||
# capitalDev
|
||||
# capitalSrc
|
||||
# ape_etab => Texte => Code APE de l'etablissement
|
||||
# ape_entrep => Texte => Code APE de l'entreprise
|
||||
# age_entrep => Entier => Age de l'entreprise
|
||||
# age_etab => Entier => Age de l'etablissement
|
||||
# tca => Entier => Tranche de chiffre d'affaire
|
||||
# tcaexp => Entier => Tranche de chiffre d'affaire à l'export
|
||||
# teff_entrep => Tranche Effectif de l'entreprise
|
||||
# teff_etab => Tranche Effectif de l'etablissement
|
||||
# rang
|
||||
# web => IF(web=='',0,1) AS pWeb
|
||||
# mail => IF(mail=='',0,1) AS pMail
|
||||
# adrDom => 0,1,2
|
||||
# lieuAct
|
||||
# actifEco => 0,1
|
||||
# presentRcs => 0,1
|
||||
# procolHisto =>
|
||||
# tvaIntraCle
|
||||
# tvaIntraValide => 0,1
|
||||
# ape4_etab
|
||||
# ape4_entrep
|
||||
# NaceEtab
|
||||
# NaceEntrep
|
||||
# dateCrea_etab => Date
|
||||
# dateCrea_ent => Date
|
||||
# dateImmat => Date
|
||||
# eff_entrep => Entier => Effectif de l'entreprise
|
||||
# eff_etab => Entier => Effectir de l'etablissement
|
||||
# distSP
|
||||
# achPost
|
||||
# rivoli
|
||||
# dirCiv
|
||||
# dirNom => IF(pDirNom=='',0,1) AS pDirNom
|
||||
# dirPrenom
|
||||
# dirDateNaiss
|
||||
# dirFct
|
||||
# nbEtab => nbEtab
|
||||
# nbMPubli
|
||||
# sirenGrp => IF(pSirenGrp=='0',0,1) AS pSirenGrp
|
||||
# nbActio =>
|
||||
# nbPart =>
|
||||
# bilType =>
|
||||
# bilAnnee =>
|
||||
# bilCloture =>
|
||||
# bilDuree =>
|
||||
# bilTca =>
|
||||
# bilEE =>
|
||||
# bilFL =>
|
||||
# bilFK =>
|
||||
# bilFR =>
|
||||
# bilGF =>
|
||||
# bilGP =>
|
||||
# bilGU =>
|
||||
# bilGW =>
|
||||
# bilHD =>
|
||||
# bilHH =>
|
||||
# bilHL =>
|
||||
# bilHM =>
|
||||
# bilHN =>
|
||||
# bilYP =>
|
||||
# avisCs
|
||||
# codeCommune =>
|
||||
# l93_x
|
||||
# l93_y
|
||||
# alt
|
||||
# precis
|
||||
# zus =>
|
||||
# zru =>
|
||||
# zfu =>
|
||||
# cucs =>
|
||||
# zrr =>
|
||||
# zafr =>
|
||||
#############################################################################
|
||||
|
||||
source ciblage
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.78.230
|
||||
sql_user = sphinx
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre = SET NAMES utf8
|
||||
sql_query = \
|
||||
SELECT LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') as nic \
|
||||
actif, siege, \
|
||||
adr_dep, \
|
||||
IF(tel=='0000000000',0,1) AS tel, \
|
||||
IF(fax=='0000000000',0,1) AS fax, \
|
||||
cj, \
|
||||
capital, \
|
||||
ape_etab, \
|
||||
ape_entrep, \
|
||||
age_entrep, \
|
||||
age_etab, \
|
||||
tca, \
|
||||
tcaexp, \
|
||||
teff_entrep, \
|
||||
teff_etab, \
|
||||
IF(web=='',0,1) AS pWeb, \
|
||||
IF(mail=='',0,1) AS pMail, \
|
||||
actifEco, \
|
||||
presentRcs, \
|
||||
tvaIntraValide, \
|
||||
dateCrea_etab,\
|
||||
dateCrea_ent, \
|
||||
dateImmat, \
|
||||
eff_entrep, \
|
||||
eff_etab, \
|
||||
FROM etablissements_act WHERE siren>100;
|
||||
|
||||
sql_attr_string = siren
|
||||
sql_attr_string = nic
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = siege
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = tel
|
||||
sql_attr_uint = fax
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = capital
|
||||
sql_attr_str2ordinal = ape_etab
|
||||
sql_attr_str2ordinal = ape_entrep
|
||||
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_uint = web
|
||||
sql_attr_uint = mail
|
||||
sql_attr_uint = actifEco
|
||||
sql_attr_uint = presentRcs
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
SELECT id, actif, siege, siren , nic, adr_cp, REPLACE(REPLACE(adr_dep, '2B', 200), '2A', 200) AS adr_dep,\
|
||||
adr_com, (tel > 0) AS tel, (fax > 0) AS fax, cj, capital, ape_etab,\
|
||||
ape_entrep, age_entrep, age_etab, tcaexp, teff_entrep, teff_etab, rang, actifEco,\
|
||||
presentRcs, procolHisto, tvaIntraValide, NaceEtab, NaceEntrep, dateCrea_etab, dateCrea_ent,\
|
||||
dateImmat, eff_entrep, eff_etab, rivoli, nbEtab, if(sirenGrp>0, 1, 0) as sirenGrp, nbActio,\
|
||||
nbPart, bilType, bilAnnee, bilTca, bilEE, bilFL, bilFK, bilFR, bilGF, bilGP, bilGU,\
|
||||
bilGW, bilHD, bilHH, bilHL, bilHM, bilHN, bilYP, avisCs,\
|
||||
bilFL - bilFK AS bilFS, bilFR - bilGF AS bilGG, bilGP - bilGU AS bilGV, bilHD - bilHH AS bilHI FROM etablissements_act WHERE siren > 100
|
||||
|
||||
|
||||
index ciblage
|
||||
{
|
||||
source = ciblage
|
||||
path = /dbs/sphinx/ciblage
|
||||
docinfo = extern
|
||||
morphology = none
|
||||
charset_type = utf-8
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user