Ajout configuration production

This commit is contained in:
Michael RICOIS 2012-07-24 08:20:20 +00:00
parent 15b729dc1a
commit f5bf1ca954
2 changed files with 236 additions and 0 deletions

View File

@ -0,0 +1,157 @@
source ciblage
{
type = mysql
sql_host = 192.168.3.30
sql_user = sphinx
sql_pass = indexer
sql_db = jo
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT id, LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') AS nic, \
siege, \
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, \
tca, \
tcaexp, \
IF(teff_entrep IS NULL,99,teff_entrep), \
IF(teff_etab IS NULL,99,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;
SELECT 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 id=23514139
5907540
sql_field_string = siren
sql_field_string = nic
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_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 = 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_uint = dirNom
sql_attr_uint = nbEtab
sql_attr_uint = nbMPubli
sql_attr_uint = sirenGrp
sql_attr_uint = nbActio
sql_attr_uint = actio
sql_attr_uint = nbPart
sql_attr_uint = 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_uint = zus
sql_attr_uint = zru
sql_attr_uint = zfu
sql_attr_uint = cucs
sql_attr_uint = zrr
sql_attr_uint = zafr
}
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
}

79
config/Odea/sphinx.conf Normal file
View File

@ -0,0 +1,79 @@
#############################################################################
## indexer settings
#############################################################################
indexer
{
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
mem_limit = 256M
# maximum IO calls per second (for I/O throttling)
# optional, default is 0 (unlimited)
#
# max_iops = 40
# maximum IO call size, bytes (for I/O throttling)
# optional, default is 0 (unlimited)
#
# max_iosize = 1048576
}
#############################################################################
## searchd settings
#############################################################################
searchd
{
# IP address to bind on
# optional, default is 0.0.0.0 (ie. listen on all interfaces)
#
# address = 127.0.0.1
# address = 192.168.0.1
# searchd TCP port number
# mandatory, default is 3312
listen = 3312
# log file, searchd run info is logged here
# optional, default is 'searchd.log'
log = /dbs/sphinxlog/searchd.log
# query log file, all search queries are logged here
# optional, default is empty (do not log queries)
query_log = /dbs/sphinxlog/query.log
# client read timeout, seconds
# optional, default is 5
read_timeout = 5
# maximum amount of children to fork (concurrent searches to run)
# optional, default is 0 (unlimited)
max_children = 30
# PID file, searchd process ID file name
# mandatory
pid_file = /var/log/searchd.pid
# max amount of matches the daemon ever keeps in RAM, per-index
# WARNING, THERE'S ALSO PER-QUERY LIMIT, SEE SetLimits() API CALL
# default is 1000 (just like Google)
max_matches = 1000
# seamless rotate, prevents rotate stalls if precaching huge datasets
# optional, default is 1
seamless_rotate = 1
# whether to forcibly preopen all indexes on startup
# optional, default is 0 (do not preopen)
preopen_indexes = 1
# whether to unlink .old index copies on succesful rotation.
# optional, default is 1 (do unlink)
unlink_old = 1
compat_sphinxql_magics=0
}