Merge branch '1.4' into develop
This commit is contained in:
commit
51b5dfd04d
@ -34,7 +34,8 @@ Utilisation des stopwords
|
||||
=========================
|
||||
un, une, le, la, les, de, des, du, dans, l', d', @
|
||||
|
||||
|
||||
Créer un fichier de stopwords
|
||||
sudo /usr/local/sphinx/bin/indexer --config /etc/sphinxsearch/sphinx.conf --buildstops stopwords-ent.txt 100 ent
|
||||
|
||||
|
||||
|
62
README
62
README
@ -0,0 +1,62 @@
|
||||
USAGE
|
||||
=====
|
||||
|
||||
Sphinx Engine configuration
|
||||
---------------------------
|
||||
- Config is store in config/
|
||||
sphinx.conf : Sphinx Engine config
|
||||
*.conf : one file per index
|
||||
conf with "tmp" must be use only on master
|
||||
- Create /etc/sphinxsearch/sphinx.conf
|
||||
- Create /etc/sphinxsearch/sphinx.reprise.conf
|
||||
- Data storage
|
||||
/var/lib/sphinxsearch/log : Log
|
||||
/var/lib/sphinxsearch/idx : Data index
|
||||
|
||||
Environment variables
|
||||
ENV_MYSQLHOST
|
||||
ENV_MYSQLUSER
|
||||
ENV_MYSQLPASS
|
||||
|
||||
sed -i -e 's/ENV_MYSQLHOST/VALUE/g' sphinx.*.conf
|
||||
sed -i -e 's/ENV_MYSQLUSER/VALUE/g' sphinx.*.conf
|
||||
sed -i -e 's/ENV_MYSQLPASS/VALUE/g' sphinx.*.conf
|
||||
sed -i -e 's/ENV_MYSQLHOST/VALUE/g' indexer/*.sh
|
||||
sed -i -e 's/ENV_MYSQLUSER/VALUE/g' indexer/*.sh
|
||||
sed -i -e 's/ENV_MYSQLPASS/VALUE/g' indexer/*.sh
|
||||
|
||||
- Crontab
|
||||
- Logrotate
|
||||
|
||||
Indexing
|
||||
--------
|
||||
indexer-*.sh : Index on master database with rotation
|
||||
slave-*.sh : Index on slave database only if master table have rotated
|
||||
manual-*.sh : Manually reload index
|
||||
|
||||
|
||||
Ubuntu PPA repository
|
||||
=====================
|
||||
sudo apt-get install software-properties-common
|
||||
sudo add-apt-repository ppa:builds/sphinxsearch-rel22
|
||||
sudo apt-get install libstemmer0d
|
||||
sudo apt-get update && apt-get install sphinxsearch
|
||||
|
||||
|
||||
Manual installation
|
||||
===================
|
||||
apt-get install mysql-client-5.5
|
||||
apt-get install gcc g++ make libmysqld-dev
|
||||
wget -nv -O - http://snowball.tartarus.org/dist/libstemmer_c.tgz | tar zx
|
||||
wget -nv -O - https://re2.googlecode.com/files/re2-20140304.tgz | tar zx
|
||||
wget http://sphinxsearch.com/files/sphinx-2.2.7-release.tar.gz
|
||||
tar xzvf sphinx-2.2.7-release.tar.gz
|
||||
cp -R libstemmer_c/* sphinx-2.2.7-release/libstemmer_c/
|
||||
sed -i -e 's/stem_ISO_8859_1_hungarian/stem_ISO_8859_2_hungarian/g' sphinx-2.2.7-release/libstemmer_c/Makefile.in
|
||||
cp -R re2/* sphinx-2.2.7-release/libre2/
|
||||
cd sphinx-2.2.7-release
|
||||
./configure --with-libstemmer --with-re2 --prefix=/usr/local/sphinx
|
||||
make
|
||||
make install
|
||||
|
||||
|
38
config/act.conf
Normal file
38
config/act.conf
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
source act
|
||||
{
|
||||
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 l.id, l.idPar, l.idAct, r.siren, r.actif, r.PpPm, r.RS, r.adresse_cp, r.adresse_ville, \
|
||||
p.libPays AS pays, l.PDetention FROM liens2 l, liensRef r, tabPays p \
|
||||
WHERE l.dateSuppr = '0000-00-00 00:00:00' AND r.id = l.idAct \
|
||||
AND ( r.siren>1000 OR (r.siren=0 AND r.adresse_pays!='FRA') OR (r.siren=0 AND r.PpPm='PP') ) \
|
||||
AND p.codPays3 = r.adresse_pays;
|
||||
sql_attr_uint = idAct
|
||||
sql_attr_bool = actif
|
||||
sql_attr_float = PDetention
|
||||
sql_attr_string = pays
|
||||
}
|
||||
|
||||
index act
|
||||
{
|
||||
source = act
|
||||
path = /var/lib/sphinxsearch/idx/act
|
||||
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
|
||||
}
|
157
config/ciblage.conf
Normal file
157
config/ciblage.conf
Normal file
@ -0,0 +1,157 @@
|
||||
|
||||
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
|
||||
}
|
157
config/ciblagetmp.conf
Normal file
157
config/ciblagetmp.conf
Normal file
@ -0,0 +1,157 @@
|
||||
|
||||
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_tmp 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
|
||||
}
|
58
config/dir.conf
Normal file
58
config/dir.conf
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
source dir
|
||||
{
|
||||
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, siren, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants;
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
{
|
||||
source = dir
|
||||
path = /var/lib/sphinxsearch/idx/dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = dir
|
||||
path = /var/lib/sphinxsearch/idx/dir_phx
|
||||
docinfo = extern
|
||||
min_stemming_len = 4
|
||||
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
|
||||
}
|
58
config/dirtmp.conf
Normal file
58
config/dirtmp.conf
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
source dir
|
||||
{
|
||||
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, siren, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants_tmp;
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
{
|
||||
source = dir
|
||||
path = /var/lib/sphinxsearch/idx/dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = dir
|
||||
path = /var/lib/sphinxsearch/idx/dir_phx
|
||||
docinfo = extern
|
||||
min_stemming_len = 4
|
||||
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
|
||||
}
|
71
config/ent.conf
Normal file
71
config/ent.conf
Normal file
@ -0,0 +1,71 @@
|
||||
|
||||
source ent
|
||||
{
|
||||
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, siren, nic, siege, \
|
||||
CONCAT_WS(" ", raisonSociale, enseigne, sigle, identite_pre) AS nom, \
|
||||
REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, adr_libVoie ,adr_comp) AS adresse, adr_cp, \
|
||||
adr_ville AS ville, cj, ape_etab, IF(siren>200,1,0) AS sirenValide, rang \
|
||||
FROM etablissements;
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_bool = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj
|
||||
sql_attr_bool = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /var/lib/sphinxsearch/idx/ent
|
||||
mlock = 1
|
||||
docinfo = extern
|
||||
stopwords = /etc/sphinxsearch/stopwords-ent.txt
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /var/lib/sphinxsearch/idx/ent_phx
|
||||
mlock = 1
|
||||
docinfo = extern
|
||||
stopwords = /etc/sphinxsearch/stopwords-ent.txt
|
||||
stopwords_unstemmed = 1
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
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
|
||||
}
|
72
config/enttmp.conf
Normal file
72
config/enttmp.conf
Normal file
@ -0,0 +1,72 @@
|
||||
|
||||
source ent
|
||||
{
|
||||
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, siren, nic, siege, \
|
||||
CONCAT_WS(" ", raisonSociale, enseigne, sigle, identite_pre) AS nom, \
|
||||
REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, adr_libVoie ,adr_comp) AS adresse, adr_cp, \
|
||||
adr_ville AS ville, cj, ape_etab, IF(siren>200,1,0) AS sirenValide, rang \
|
||||
FROM etablissements_tmp;
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_bool = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj:4
|
||||
sql_attr_bool = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /var/lib/sphinxsearch/idx/ent
|
||||
mlock = 1
|
||||
docinfo = extern
|
||||
stopwords = /etc/sphinxsearch/stopwords-ent.txt
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /var/lib/sphinxsearch/idx/ent_phx
|
||||
mlock = 1
|
||||
docinfo = extern
|
||||
stopwords = /etc/sphinxsearch/stopwords-ent.txt
|
||||
stopwords_unstemmed = 1
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
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
|
||||
}
|
31
config/histo.conf
Normal file
31
config/histo.conf
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = ENV_MYSQLHOST
|
||||
sql_port = 3306
|
||||
sql_user = ENV_MYSQLUSER
|
||||
sql_pass = ENV_MYSQLPASS
|
||||
sql_db = histobodacc
|
||||
sql_query_pre = SET NAMES utf8
|
||||
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
||||
sql_attr_uint = annee1
|
||||
}
|
||||
|
||||
index histo
|
||||
{
|
||||
source = histo
|
||||
path = /var/lib/sphinxsearch/idx/histo
|
||||
min_word_len = 3
|
||||
html_strip = 1
|
||||
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
|
||||
}
|
337
config/sphinx.conf
Normal file
337
config/sphinx.conf
Normal file
@ -0,0 +1,337 @@
|
||||
|
||||
#############################################################################
|
||||
## indexer settings
|
||||
#############################################################################
|
||||
|
||||
indexer
|
||||
{
|
||||
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
|
||||
# optional, default is 128M, 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
|
||||
|
||||
|
||||
# maximum xmlpipe2 field length, bytes
|
||||
# optional, default is 2M
|
||||
#
|
||||
# max_xmlpipe2_field = 4M
|
||||
|
||||
|
||||
# write buffer size, bytes
|
||||
# several (currently up to 4) buffers will be allocated
|
||||
# write buffers are allocated in addition to mem_limit
|
||||
# optional, default is 1M
|
||||
#
|
||||
# write_buffer = 1M
|
||||
|
||||
|
||||
# maximum file field adaptive buffer size
|
||||
# optional, default is 8M, minimum is 1M
|
||||
#
|
||||
# max_file_field_buffer = 32M
|
||||
|
||||
|
||||
# how to handle IO errors in file fields
|
||||
# known values are 'ignore_field', 'skip_document', and 'fail_index'
|
||||
# optional, default is 'ignore_field'
|
||||
#
|
||||
# on_file_field_error = skip_document
|
||||
|
||||
|
||||
# how to handle syntax errors in JSON attributes
|
||||
# known values are 'ignore_attr' and 'fail_index'
|
||||
# optional, default is 'ignore_attr'
|
||||
#
|
||||
# on_json_attr_error = fail_index
|
||||
|
||||
|
||||
# whether to auto-convert numeric values from strings in JSON attributes
|
||||
# with auto-conversion, string value with actually numeric data
|
||||
# (as in {"key":"12345"}) gets stored as a number, rather than string
|
||||
# optional, allowed values are 0 and 1, default is 0 (do not convert)
|
||||
#
|
||||
# json_autoconv_numbers = 1
|
||||
|
||||
|
||||
# whether and how to auto-convert key names in JSON attributes
|
||||
# known value is 'lowercase'
|
||||
# optional, default is unspecified (do nothing)
|
||||
#
|
||||
# json_autoconv_keynames = lowercase
|
||||
|
||||
|
||||
# lemmatizer cache size
|
||||
# improves the indexing time when the lemmatization is enabled
|
||||
# optional, default is 256K
|
||||
#
|
||||
# lemmatizer_cache = 512M
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
## searchd settings
|
||||
#############################################################################
|
||||
|
||||
searchd
|
||||
{
|
||||
# [hostname:]port[:protocol], or /unix/socket/path to listen on
|
||||
# known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL)
|
||||
#
|
||||
# multi-value, multiple listen points are allowed
|
||||
# optional, defaults are 9312:sphinx and 9306:mysql41, as below
|
||||
#
|
||||
# listen = 127.0.0.1
|
||||
# listen = 192.168.0.1:9312
|
||||
# listen = 9312
|
||||
# listen = /var/run/searchd.sock
|
||||
listen = 9312
|
||||
listen = 9306:mysql41
|
||||
|
||||
# log file, searchd run info is logged here
|
||||
# optional, default is 'searchd.log'
|
||||
log = /var/lib/sphinxsearch/log/searchd.log
|
||||
|
||||
# query log file, all search queries are logged here
|
||||
# optional, default is empty (do not log queries)
|
||||
query_log = /var/lib/sphinxsearch/log/query.log
|
||||
|
||||
# client read timeout, seconds
|
||||
# optional, default is 5
|
||||
read_timeout = 5
|
||||
|
||||
# request timeout, seconds
|
||||
# optional, default is 5 minutes
|
||||
client_timeout = 300
|
||||
|
||||
# maximum amount of children to fork (concurrent searches to run)
|
||||
# optional, default is 0 (unlimited)
|
||||
max_children = 30
|
||||
|
||||
# maximum amount of persistent connections from this master to each agent host
|
||||
# optional, but necessary if you use agent_persistent. It is reasonable to set the value
|
||||
# as max_children, or less on the agent's hosts.
|
||||
persistent_connections_limit = 30
|
||||
|
||||
# PID file, searchd process ID file name
|
||||
# mandatory
|
||||
pid_file = /var/run/searchd.pid
|
||||
|
||||
# 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 1 (preopen everything)
|
||||
preopen_indexes = 1
|
||||
|
||||
# whether to unlink .old index copies on succesful rotation.
|
||||
# optional, default is 1 (do unlink)
|
||||
unlink_old = 1
|
||||
|
||||
# attribute updates periodic flush timeout, seconds
|
||||
# updates will be automatically dumped to disk this frequently
|
||||
# optional, default is 0 (disable periodic flush)
|
||||
#
|
||||
# attr_flush_period = 900
|
||||
|
||||
|
||||
# MVA updates pool size
|
||||
# shared between all instances of searchd, disables attr flushes!
|
||||
# optional, default size is 1M
|
||||
mva_updates_pool = 1M
|
||||
|
||||
# max allowed network packet size
|
||||
# limits both query packets from clients, and responses from agents
|
||||
# optional, default size is 8M
|
||||
max_packet_size = 8M
|
||||
|
||||
# max allowed per-query filter count
|
||||
# optional, default is 256
|
||||
max_filters = 256
|
||||
|
||||
# max allowed per-filter values count
|
||||
# optional, default is 4096
|
||||
max_filter_values = 4096
|
||||
|
||||
|
||||
# socket listen queue length
|
||||
# optional, default is 5
|
||||
#
|
||||
# listen_backlog = 5
|
||||
|
||||
|
||||
# per-keyword read buffer size
|
||||
# optional, default is 256K
|
||||
#
|
||||
# read_buffer = 256K
|
||||
|
||||
|
||||
# unhinted read size (currently used when reading hits)
|
||||
# optional, default is 32K
|
||||
#
|
||||
# read_unhinted = 32K
|
||||
|
||||
|
||||
# max allowed per-batch query count (aka multi-query count)
|
||||
# optional, default is 32
|
||||
max_batch_queries = 32
|
||||
|
||||
|
||||
# max common subtree document cache size, per-query
|
||||
# optional, default is 0 (disable subtree optimization)
|
||||
#
|
||||
# subtree_docs_cache = 4M
|
||||
|
||||
|
||||
# max common subtree hit cache size, per-query
|
||||
# optional, default is 0 (disable subtree optimization)
|
||||
#
|
||||
# subtree_hits_cache = 8M
|
||||
|
||||
|
||||
# multi-processing mode (MPM)
|
||||
# known values are none, fork, prefork, and threads
|
||||
# threads is required for RT backend to work
|
||||
# optional, default is threads
|
||||
workers = prefork
|
||||
|
||||
|
||||
# max threads to create for searching local parts of a distributed index
|
||||
# optional, default is 0, which means disable multi-threaded searching
|
||||
# should work with all MPMs (ie. does NOT require workers=threads)
|
||||
#
|
||||
dist_threads = 2
|
||||
|
||||
|
||||
# binlog files path; use empty string to disable binlog
|
||||
# optional, default is build-time configured data directory
|
||||
#
|
||||
# binlog_path = # disable logging
|
||||
# binlog_path = @CONFDIR@/data # binlog.001 etc will be created there
|
||||
|
||||
|
||||
# binlog flush/sync mode
|
||||
# 0 means flush and sync every second
|
||||
# 1 means flush and sync every transaction
|
||||
# 2 means flush every transaction, sync every second
|
||||
# optional, default is 2
|
||||
#
|
||||
# binlog_flush = 2
|
||||
|
||||
|
||||
# binlog per-file size limit
|
||||
# optional, default is 128M, 0 means no limit
|
||||
#
|
||||
# binlog_max_log_size = 256M
|
||||
|
||||
|
||||
# per-thread stack size, only affects workers=threads mode
|
||||
# optional, default is 64K
|
||||
#
|
||||
# thread_stack = 128K
|
||||
|
||||
|
||||
# per-keyword expansion limit (for dict=keywords prefix searches)
|
||||
# optional, default is 0 (no limit)
|
||||
#
|
||||
# expansion_limit = 1000
|
||||
|
||||
|
||||
# RT RAM chunks flush period
|
||||
# optional, default is 0 (no periodic flush)
|
||||
#
|
||||
# rt_flush_period = 900
|
||||
|
||||
|
||||
# query log file format
|
||||
# optional, known values are plain and sphinxql, default is plain
|
||||
#
|
||||
# query_log_format = sphinxql
|
||||
|
||||
|
||||
# version string returned to MySQL network protocol clients
|
||||
# optional, default is empty (use Sphinx version)
|
||||
#
|
||||
# mysql_version_string = 5.0.37
|
||||
|
||||
|
||||
# trusted plugin directory
|
||||
# optional, default is empty (disable UDFs)
|
||||
#
|
||||
# plugin_dir = /usr/local/sphinx/lib
|
||||
|
||||
|
||||
# default server-wide collation
|
||||
# optional, default is libc_ci
|
||||
#
|
||||
# collation_server = utf8_general_ci
|
||||
|
||||
|
||||
# server-wide locale for libc based collations
|
||||
# optional, default is C
|
||||
#
|
||||
# collation_libc_locale = ru_RU.UTF-8
|
||||
|
||||
|
||||
# threaded server watchdog (only used in workers=threads mode)
|
||||
# optional, values are 0 and 1, default is 1 (watchdog on)
|
||||
#
|
||||
# watchdog = 1
|
||||
|
||||
|
||||
# costs for max_predicted_time model, in (imaginary) nanoseconds
|
||||
# optional, default is "doc=64, hit=48, skip=2048, match=64"
|
||||
#
|
||||
# predicted_time_costs = doc=64, hit=48, skip=2048, match=64
|
||||
|
||||
|
||||
# current SphinxQL state (uservars etc) serialization path
|
||||
# optional, default is none (do not serialize SphinxQL state)
|
||||
#
|
||||
# sphinxql_state = sphinxvars.sql
|
||||
|
||||
|
||||
# maximum RT merge thread IO calls per second, and per-call IO size
|
||||
# useful for throttling (the background) OPTIMIZE INDEX impact
|
||||
# optional, default is 0 (unlimited)
|
||||
#
|
||||
# rt_merge_iops = 40
|
||||
# rt_merge_maxiosize = 1M
|
||||
|
||||
|
||||
# interval between agent mirror pings, in milliseconds
|
||||
# 0 means disable pings
|
||||
# optional, default is 1000
|
||||
#
|
||||
# ha_ping_interval = 0
|
||||
|
||||
|
||||
# agent mirror statistics window size, in seconds
|
||||
# stats older than the window size (karma) are retired
|
||||
# that is, they will not affect master choice of agents in any way
|
||||
# optional, default is 60 seconds
|
||||
#
|
||||
# ha_period_karma = 60
|
||||
|
||||
|
||||
# delay between preforked children restarts on rotation, in milliseconds
|
||||
# optional, default is 0 (no delay)
|
||||
#
|
||||
# prefork_rotation_throttle = 100
|
||||
|
||||
|
||||
# a prefix to prepend to the local file names when creating snippets
|
||||
# with load_files and/or load_files_scatter options
|
||||
# optional, default is empty
|
||||
#
|
||||
# snippets_file_prefix = /mnt/common/server1/
|
||||
}
|
1101
config/sphinx.conf.original
Normal file
1101
config/sphinx.conf.original
Normal file
File diff suppressed because it is too large
Load Diff
18
config/stopwords-ent.txt
Normal file
18
config/stopwords-ent.txt
Normal file
@ -0,0 +1,18 @@
|
||||
sci
|
||||
sarl
|
||||
societe
|
||||
france
|
||||
association
|
||||
civile
|
||||
immobiliere
|
||||
services
|
||||
chez
|
||||
gaulle
|
||||
mer
|
||||
republique
|
||||
ecole
|
||||
seine
|
||||
rene
|
||||
bat
|
||||
madame
|
||||
monsieur
|
@ -47,7 +47,6 @@ bastide > bstd
|
||||
baston > bast
|
||||
beguinage > begi
|
||||
berge > ber
|
||||
bois > bois
|
||||
boite postal > bp
|
||||
boucle > bcle
|
||||
boulevard > bd
|
12
env.sh
Normal file
12
env.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
ENV_MYSQLHOST=192.168.3.28
|
||||
ENV_MYSQLUSER=sphinx
|
||||
ENV_MYSQLPASS=indexer
|
||||
|
||||
sed -i -e s/ENV_MYSQLHOST/"$ENV_MYSQLHOST"/g sphinx.*.conf
|
||||
sed -i -e s/ENV_MYSQLUSER/"$ENV_MYSQLUSER"/g sphinx.*.conf
|
||||
sed -i -e s/ENV_MYSQLPASS/"$ENV_MYSQLPASS"/g sphinx.*.conf
|
||||
sed -i -e s/ENV_MYSQLHOST/"$ENV_MYSQLHOST"/g indexer/*.sh
|
||||
sed -i -e s/ENV_MYSQLUSER/"$ENV_MYSQLUSER"/g indexer/*.sh
|
||||
sed -i -e s/ENV_MYSQLPASS/"$ENV_MYSQLPASS"/g indexer/*.sh
|
7
indexer/indexer-act.sh
Normal file
7
indexer/indexer-act.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ACT" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --rotate act >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ACT" >> $PATH_LOG/indexer.log
|
45
indexer/indexer-ciblage.sh
Normal file
45
indexer/indexer-ciblage.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-ciblage.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# Lancement de l'indexation si la consolidation a eu lieu
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingBegin=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate ciblage >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Rotation des tables MySQL - @todo
|
||||
#echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Debut" >> $PATH_LOG/indexer.log
|
||||
#mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/rotate-ciblage.sql >> $PATH_LOG/indexer.log
|
||||
#echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Fin Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingEnd=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
79
indexer/indexer-dir.sh
Executable file
79
indexer/indexer-dir.sh
Executable file
@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Indexation déjà lancé
|
||||
FILEINDEX=$PATH_LOG/dir-$(date '+%Y%m%d').idx
|
||||
if [ -f "$FILEINDEX" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-dir.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# Lancement de l'indexation si la consolidation a eu lieu
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Nombre de lignes dans la table etablissements
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/count-dir.sql)
|
||||
nbC='';
|
||||
for line in "$output"; do
|
||||
nbC="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
nbC=$(echo $nbC|sed -e "s/^[nbC ]*//g"||sed -e "s/[ ]*$//g")
|
||||
nbC=$(echo $(($nbC - 1000)))
|
||||
|
||||
# Nombre de lignes dans la table etablissements_tmp
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS < $PATH_SQL/count-dirtmp.sql)
|
||||
nbT='';
|
||||
for line in "$output"; do
|
||||
nbT="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
nbT=$(echo $nbT|sed -e "s/^[nbT ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
if [ -z "$nbC" ]; then
|
||||
echo $nbC
|
||||
elif [ -z "$nbT" ]; then
|
||||
echo $nbT
|
||||
elif [ "$nbT" -gt "$nbC" ]; then
|
||||
|
||||
# Create file to indicate indexing
|
||||
rm -f $PATH_LOG/dir-*.idx
|
||||
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingBegin=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate dir dir_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Rotation des tables MySQL
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Debut" >> $PATH_LOG/indexer.log
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/rotate-dir.sql >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Fin Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingEnd=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
fi
|
||||
fi
|
||||
fi
|
78
indexer/indexer-ent.sh
Executable file
78
indexer/indexer-ent.sh
Executable file
@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Indexation déjà lancé
|
||||
FILEINDEX=$PATH_LOG/ent-$(date '+%Y%m%d').idx
|
||||
if [ -f "$FILEINDEX" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Is consolidated ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/consolidate-ent.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# Lancement de l'indexation si la consolidation a eu lieu
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Nombre de lignes dans la table etablissements
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/count-ent.sql)
|
||||
nbC='';
|
||||
for line in "$output"; do
|
||||
nbC="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
nbC=$(echo $nbC|sed -e "s/^[nbC ]*//g"||sed -e "s/[ ]*$//g")
|
||||
nbC=$(echo $(($nbC - 1000)))
|
||||
|
||||
# Nombre de lignes dans la table etablissements_tmp
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS < $PATH_SQL/count-enttmp.sql)
|
||||
nbT='';
|
||||
for line in "$output"; do
|
||||
nbT="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
nbT=$(echo $nbT|sed -e "s/^[nbT ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
if [ -z "$nbC" ]; then
|
||||
echo $nbC
|
||||
elif [ -z "$nbT" ]; then
|
||||
echo $nbT
|
||||
elif [ "$nbT" -gt "$nbC" ]; then
|
||||
# Create file to indicate indexing
|
||||
rm -f $PATH_LOG/ent-*.idx
|
||||
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
# Enregistrement Debut Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingBegin=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate ent ent_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Rotation des tables MySQL
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Debut" >> $PATH_LOG/indexer.log
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS jo < $PATH_SQL/rotate-ent.sql >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Rotation Table - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Enregistrement Fin Indexation
|
||||
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 -e "UPDATE sphinx_idx SET indexingEnd=NOW() WHERE id=$idx" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
fi
|
||||
fi
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/local/sphinx/bin
|
||||
PATH_LOG=/dbs/sphinxlog
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === DEBUT de l'indexation" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --rotate act >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/local/sphinx/bin
|
||||
PATH_LOG=/dbs/sphinxlog
|
||||
PATH_SQL=/home/scripts/indexer/sql
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === DEBUT de l'indexation" >> $PATH_LOG/indexer.log
|
||||
|
||||
# nombre de lignes dans la table etab
|
||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countDiri.sql)
|
||||
for line in "$output"; do
|
||||
etab="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# nombre de lignes dans la table diri_tmp
|
||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countDiri_tmp.sql)
|
||||
for line in "$output"; do
|
||||
etab_tmp="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
etab_tmp=$(echo $etab_tmp|sed -e "s/^[etab_tmp ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
|
||||
if [ -z "$etab" ]; then
|
||||
echo "etab = null"
|
||||
elif [ -z "$etab_tmp" ]; then
|
||||
echo "etab_tmp = null"
|
||||
elif [ $etab_tmp -gt $etab ]; then
|
||||
echo "Il y a $etab_tmp lignes dans la nouvelle table dirigeants ($etab lignes dans l'ancienne)" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate dir dir_phx >> $PATH_LOG/indexer.log
|
||||
echo "Sphinx - termine : $(date +%H:%M:%S)" >> $PATH_LOG/indexer.log
|
||||
mysql -f -usphinx -h192.168.3.30 -pindexer jo < $PATH_SQL/finIndexationDiri.sql >> $PATH_LOG/indexer.log
|
||||
else
|
||||
# Il y a plus de lignes dans l'ancienne table dirigeants ==> On ne fait rien
|
||||
echo "Il n'y a pas assez de lignes dans la nouvelle table dirigeants ($etab_tmp / $etab) !" >> $PATH_LOG/indexer.log
|
||||
fi
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/local/sphinx/bin
|
||||
PATH_LOG=/dbs/sphinxlog
|
||||
PATH_SQL=/home/scripts/indexer/sql
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === DEBUT de l'indexation" >> $PATH_LOG/indexer.log
|
||||
|
||||
# nombre de lignes dans la table etab
|
||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countEtab.sql)
|
||||
for line in "$output"; do
|
||||
etab="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
|
||||
# Cast de la variable au cas ou
|
||||
#etab=$(echo $etab| gawk '{print + 0}')
|
||||
|
||||
# nombre de lignes dans la table etab_tmp
|
||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countEtab_tmp.sql)
|
||||
for line in "$output"; do
|
||||
etab_tmp="$line"
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
etab_tmp=$(echo $etab_tmp|sed -e "s/^[etab_tmp ]*//g"||sed -e "s/[ ]*$//g")
|
||||
# Cast de la variable au cas ou
|
||||
#etab_tmp=$(echo $etab_tmp| gawk '{print + 0}')
|
||||
|
||||
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
|
||||
if [ -z "$etab" ]; then
|
||||
echo "etab = null"
|
||||
elif [ -z "$etab_tmp" ]; then
|
||||
echo "etab_tmp = null"
|
||||
elif [ $etab_tmp -gt $etab ]; then
|
||||
echo "Il y a $etab_tmp lignes dans la nouvelle table etablissement ($etab lignes dans l'ancienne)" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate ent ent_phx >> $PATH_LOG/indexer.log
|
||||
echo "Sphinx - terminé : $(date +%H:%M:%S)" >> $PATH_LOG/indexer.log
|
||||
mysql -f -usphinx -h192.168.3.30 -pindexer jo < $PATH_SQL/finIndexationEtab.sql >> $PATH_LOG/indexer.log
|
||||
else
|
||||
# Il y a plus de lignes dans l'ancienne table etablissements ==> On ne fait rien
|
||||
echo "Il n'y a pas assez de lignes dans la nouvelle table etablissement ($etab_tmp / $etab) !" >> $PATH_LOG/indexer.log
|
||||
fi
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
7
indexer/manual-act.sh
Normal file
7
indexer/manual-act.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ACT" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --rotate act >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ACT" >> $PATH_LOG/indexer.log
|
15
indexer/manual-ciblage.sh
Normal file
15
indexer/manual-ciblage.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === RERPISE INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.reprise.conf --rotate ciblage >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN REPRISE INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
|
||||
|
13
indexer/manual-dir.sh
Normal file
13
indexer/manual-dir.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === REPRISE INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.reprise.conf --rotate dir dir_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN REPRISE INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
12
indexer/manual-ent.sh
Normal file
12
indexer/manual-ent.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === REPRISE INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.reprise.conf --rotate ent ent_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN REPRISE INDEXATION ENT" >> $PATH_LOG/indexer.log
|
7
indexer/manual-histo.sh
Normal file
7
indexer/manual-histo.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION HISTO" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --rotate histo >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION HISTO" >> $PATH_LOG/indexer.log
|
46
indexer/slave-ciblage.sh
Normal file
46
indexer/slave-ciblage.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Indexation déjà lancé
|
||||
FILEINDEX=$PATH_LOG/ciblage-$(date '+%Y%m%d').idx
|
||||
if [ -f "$FILEINDEX" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Indexation sur le master ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/slave-ciblage.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
# Lancement de l'indexation
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Create file to indicate indexing on slave
|
||||
rm -v $PATH_LOG/ciblage-*.idx
|
||||
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate ciblage >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION CIBLAGE" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
48
indexer/slave-dir.sh
Normal file
48
indexer/slave-dir.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Indexation déjà lancé
|
||||
FILEINDEX=$PATH_LOG/dir-$(date '+%Y%m%d').idx
|
||||
if [ -f "$FILEINDEX" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Indexation sur le master ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/slave-dir.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === TENTATIVE INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Lancement de l'indexation
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Create file to indicate indexing
|
||||
rm -f $PATH_LOG/dir-*.idx
|
||||
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate dir dir_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION DIR" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
48
indexer/slave-ent.sh
Normal file
48
indexer/slave-ent.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
MYSQL_HOST=ENV_MYSQLHOST
|
||||
MYSQL_USER=ENV_MYSQLUSER
|
||||
MYSQL_PASS=ENV_MYSQLPASS
|
||||
PATH_LOG=/var/lib/sphinxsearch/log
|
||||
PATH_BIN=/usr/bin
|
||||
PATH_SQL=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/sql
|
||||
|
||||
# Indexation déjà lancé
|
||||
FILEINDEX=$PATH_LOG/ent-$(date '+%Y%m%d').idx
|
||||
if [ -f "$FILEINDEX" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Indexation sur le master ?
|
||||
output=$(mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS sdv1 < $PATH_SQL/slave-ent.sql)
|
||||
idx='';
|
||||
for line in "$output"; do
|
||||
idx="$line";
|
||||
done
|
||||
# Suppression fin de ligne
|
||||
idx=$(echo $idx|sed -e "s/^[idx ]*//g"||sed -e "s/[ ]*$//g")
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === TENTATIVE INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Lancement de l'indexation
|
||||
if [ -n "$idx" ]; then
|
||||
if [[ "$idx" > 0 ]]; then
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
# Create file to indicate indexing
|
||||
rm -f $PATH_LOG/ent-*.idx
|
||||
echo "START $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
# Sphinx rotate
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Debut" >> $PATH_LOG/indexer.log
|
||||
$PATH_BIN/indexer --config /etc/sphinxsearch/sphinx.conf --rotate ent ent_phx >> $PATH_LOG/indexer.log
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Sphinx - Fin" >> $PATH_LOG/indexer.log
|
||||
|
||||
echo "FIN $(date '+%Y-%m-%d %H:%M:%S')" >> $FILEINDEX
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN INDEXATION ENT" >> $PATH_LOG/indexer.log
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
6
indexer/sql/consolidate-ciblage.sql
Normal file
6
indexer/sql/consolidate-ciblage.sql
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 2 HOUR) AND NOW()
|
||||
AND nom = 'jo.etablissements_act'
|
||||
AND indexingBegin IS NULL
|
||||
AND indexingEnd IS NULL
|
||||
ORDER BY createEnd DESC LIMIT 1;
|
6
indexer/sql/consolidate-dir.sql
Normal file
6
indexer/sql/consolidate-dir.sql
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 1 HOUR) AND NOW()
|
||||
AND nom = 'jo.dirigeants'
|
||||
AND indexingBegin IS NULL
|
||||
AND indexingEnd IS NULL
|
||||
ORDER BY createEnd DESC LIMIT 1;
|
6
indexer/sql/consolidate-ent.sql
Normal file
6
indexer/sql/consolidate-ent.sql
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 1 HOUR) AND NOW()
|
||||
AND nom = 'jo.etablissements'
|
||||
AND indexingBegin IS NULL
|
||||
AND indexingEnd IS NULL
|
||||
ORDER BY createEnd DESC LIMIT 1;
|
1
indexer/sql/count-dir.sql
Normal file
1
indexer/sql/count-dir.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT count(*) AS nb from dirigeants;
|
1
indexer/sql/count-dirtmp.sql
Normal file
1
indexer/sql/count-dirtmp.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT count(*) AS nb from dirigeants_tmp;
|
1
indexer/sql/count-ent.sql
Normal file
1
indexer/sql/count-ent.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT count(*) AS nb from etablissements;
|
1
indexer/sql/count-enttmp.sql
Normal file
1
indexer/sql/count-enttmp.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT count(*) AS nb from etablissements_tmp;
|
@ -1 +0,0 @@
|
||||
SELECT count(*) AS etab from dirigeants;
|
@ -1 +0,0 @@
|
||||
SELECT count(*) AS etab_tmp from dirigeants_tmp;
|
@ -1 +0,0 @@
|
||||
SELECT count(*) AS etab from etablissements;
|
@ -1 +0,0 @@
|
||||
SELECT count(*) AS etab_tmp from etablissements_tmp;
|
6
indexer/sql/manual-consolidate-ciblage.sql
Normal file
6
indexer/sql/manual-consolidate-ciblage.sql
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE createEnd BETWEEN (NOW() - INTERVAL 7 DAY) AND NOW()
|
||||
AND nom = 'jo.etablissements_act'
|
||||
AND indexingBegin IS NULL
|
||||
AND indexingEnd IS NULL
|
||||
ORDER BY createEnd DESC LIMIT 1;
|
3
indexer/sql/rotate-ciblage.sql
Normal file
3
indexer/sql/rotate-ciblage.sql
Normal file
@ -0,0 +1,3 @@
|
||||
DROP TABLE IF EXISTS jo.etablissements_act_old;
|
||||
RENAME TABLE jo.etablissements_act TO jo.etablissements_act_old;
|
||||
RENAME TABLE jo.etablissements_act_tmp TO jo.etablissements_act;
|
4
indexer/sql/slave-ciblage.sql
Normal file
4
indexer/sql/slave-ciblage.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE indexingEnd BETWEEN (NOW() - INTERVAL 2 HOUR) AND NOW()
|
||||
AND nom = 'jo.etablissements_act'
|
||||
ORDER BY indexingEnd DESC LIMIT 1;
|
4
indexer/sql/slave-dir.sql
Normal file
4
indexer/sql/slave-dir.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE indexingEnd BETWEEN (NOW() - INTERVAL 2 HOUR) AND NOW()
|
||||
AND nom = 'jo.dirigeants'
|
||||
ORDER BY indexingEnd DESC LIMIT 1;
|
4
indexer/sql/slave-ent.sql
Normal file
4
indexer/sql/slave-ent.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT id FROM sphinx_idx
|
||||
WHERE indexingEnd BETWEEN (NOW() - INTERVAL 2 HOUR) AND NOW()
|
||||
AND nom = 'jo.etablissements'
|
||||
ORDER BY indexingEnd DESC LIMIT 1;
|
@ -1,157 +0,0 @@
|
||||
|
||||
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, \
|
||||
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, \
|
||||
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_uint = siege
|
||||
sql_attr_uint = adr_cp
|
||||
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
|
||||
sql_attr_uint = avisCs
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
|
||||
#############################################################################
|
||||
## 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
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
|
||||
source act
|
||||
{
|
||||
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 l.id, l.idPar, l.idAct, r.siren, r.actif, r.PpPm, r.RS, r.adresse_cp, r.adresse_ville, p.libPays AS pays, l.PDetention \
|
||||
FROM liens2 l, liensRef r, tabPays p \
|
||||
WHERE l.dateSuppr = '0000-00-00 00:00:00' \
|
||||
AND r.id = l.idAct \
|
||||
AND ( r.siren>1000 OR (r.siren=0 AND r.adresse_pays!='FRA') OR (r.siren=0 AND r.PpPm='PP') ) \
|
||||
AND p.codPays3 = r.adresse_pays;
|
||||
|
||||
sql_attr_uint = idAct
|
||||
sql_attr_uint = actif
|
||||
sql_attr_float= PDetention
|
||||
sql_attr_string = pays
|
||||
}
|
||||
|
||||
index act
|
||||
{
|
||||
source = act
|
||||
path = /dbs/sphinx/act
|
||||
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
|
||||
}
|
@ -1,157 +0,0 @@
|
||||
|
||||
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 id, LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') 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, \
|
||||
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_uint = siege
|
||||
sql_attr_uint = adr_cp
|
||||
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
|
||||
sql_attr_uint = avisCs
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
#############################################################################
|
||||
# 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>0,1,0) AS pTel
|
||||
# fax => IF(fax>0,1,0) 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 => Nombre d'établissement
|
||||
# nbMPubli
|
||||
# sirenGrp => IF(pSirenGrp>0,1,0) AS pSirenGrp
|
||||
# nbActio => Entier => Nombre d'actionnaires (actio,bool)
|
||||
# nbPart => Entier => Nombre de participations (part, bool)
|
||||
# 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 =>
|
||||
#############################################################################
|
@ -1,64 +0,0 @@
|
||||
|
||||
source dir
|
||||
{
|
||||
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 id, siren, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants;
|
||||
sql_attr_string = civilite
|
||||
sql_attr_string = typeDir
|
||||
sql_attr_string = fonction_code
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
{
|
||||
source = dir
|
||||
path = /dbs/sphinx/dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
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
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
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, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants_tmp;
|
||||
sql_attr_string = civilite
|
||||
sql_attr_string = typeDir
|
||||
sql_attr_string = fonction_code
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
{
|
||||
source = dir
|
||||
path = /dbs/sphinx/dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
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
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
|
||||
source ent
|
||||
{
|
||||
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 id, siren, nic, siege, \
|
||||
CONCAT_WS(" ", \
|
||||
raisonSociale, \
|
||||
enseigne, \
|
||||
sigle, \
|
||||
identite_pre\
|
||||
) AS nom, REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, adr_libVoie ,adr_comp) AS adresse, adr_cp, \
|
||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
||||
FROM etablissements;
|
||||
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent
|
||||
docinfo = extern
|
||||
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
|
||||
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
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
|
||||
wordforms = /usr/local/sphinx/etc/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
|
||||
source ent
|
||||
{
|
||||
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 id, siren, nic, siege, \
|
||||
CONCAT_WS(" ", \
|
||||
raisonSociale, \
|
||||
enseigne, \
|
||||
sigle, \
|
||||
identite_pre\
|
||||
) AS nom, REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, 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_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent
|
||||
docinfo = extern
|
||||
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
|
||||
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
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
|
||||
wordforms = /usr/local/sphinx/etc/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.78.230
|
||||
sql_user = sphinx
|
||||
sql_pass = indexer
|
||||
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 = /dbs/sphinx/histo
|
||||
docinfo = extern
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = sbcs
|
||||
html_strip = 1
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
source ent
|
||||
{
|
||||
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, siren, nic, siege, \
|
||||
CONCAT_WS(" ", \
|
||||
raisonSociale, \
|
||||
enseigne, \
|
||||
sigle, \
|
||||
identite_pre\
|
||||
) AS nom, REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, adr_libVoie ,adr_comp) AS adresse, adr_cp, \
|
||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
||||
FROM etablissements;
|
||||
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent
|
||||
docinfo = extern
|
||||
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
|
||||
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
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
|
||||
wordforms = /usr/local/sphinx/etc/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
source ent
|
||||
{
|
||||
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, siren, nic, siege, \
|
||||
CONCAT_WS(" ", \
|
||||
raisonSociale, \
|
||||
enseigne, \
|
||||
sigle, \
|
||||
identite_pre\
|
||||
) AS nom, REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
|
||||
actif, adr_num, CONCAT_WS(" ", adr_typeVoie, 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_uint = siren
|
||||
sql_attr_uint = nic
|
||||
sql_attr_uint = siege
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_num
|
||||
sql_attr_uint = adr_cp
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = sirenValide
|
||||
sql_attr_uint = rang
|
||||
}
|
||||
|
||||
index ent
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent
|
||||
docinfo = extern
|
||||
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
|
||||
|
||||
wordforms = /etc/sphinxsearch/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
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
|
||||
wordforms = /usr/local/sphinx/etc/wordforms-ent.txt
|
||||
enable_star = 1
|
||||
morphology = libstemmer_fr
|
||||
min_stemming_len = 4
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
|
||||
#############################################################################
|
||||
## 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
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
|
||||
source act
|
||||
{
|
||||
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 l.id, l.idPar, l.idAct, r.siren, r.actif, r.PpPm, r.RS, r.adresse_cp, r.adresse_ville, p.libPays AS pays, l.PDetention \
|
||||
FROM liens2 l, liensRef r, tabPays p \
|
||||
WHERE l.dateSuppr = '0000-00-00 00:00:00' \
|
||||
AND r.id = l.idAct \
|
||||
AND ( r.siren>1000 OR (r.siren=0 AND r.adresse_pays!='FRA') OR (r.siren=0 AND r.PpPm='PP') ) \
|
||||
AND p.codPays3 = r.adresse_pays;
|
||||
|
||||
sql_attr_uint = idAct
|
||||
sql_attr_uint = actif
|
||||
sql_attr_float= PDetention
|
||||
sql_attr_string = pays
|
||||
}
|
||||
|
||||
index act
|
||||
{
|
||||
source = act
|
||||
path = /dbs/sphinx/act
|
||||
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
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
source dir
|
||||
{
|
||||
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, siren, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants_tmp;
|
||||
sql_attr_string = civilite
|
||||
sql_attr_string = typeDir
|
||||
sql_attr_string = fonction_code
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
{
|
||||
source = dir
|
||||
path = /dbs/sphinx/dir
|
||||
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
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.3.24
|
||||
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
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
|
||||
#############################################################################
|
||||
## 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 = 2047M
|
||||
|
||||
# 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 = 0
|
||||
|
||||
# whether to unlink .old index copies on succesful rotation.
|
||||
# optional, default is 1 (do unlink)
|
||||
unlink_old = 1
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
|
||||
#############################################################################
|
||||
## 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 = 1024M
|
||||
|
||||
# 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 = 9312
|
||||
|
||||
# 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 = 0
|
||||
|
||||
# whether to unlink .old index copies on succesful rotation.
|
||||
# optional, default is 1 (do unlink)
|
||||
unlink_old = 1
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
source dir
|
||||
{
|
||||
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, adr_dep, typeDir, dirSiren, civilite, 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, fonction_code, actif \
|
||||
FROM dirigeants;
|
||||
sql_attr_str2ordinal = civilite
|
||||
sql_attr_str2ordinal = typeDir
|
||||
sql_attr_str2ordinal = fonction_code
|
||||
sql_attr_uint = dirSiren
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
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
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
// Paramètres
|
||||
if ( count($argv)<1 || in_array($argv[1], array('--help', '-help', '-h', '-?')) ) {
|
||||
?>
|
||||
Utilisation : <?php echo $argv[0]; ?> [actions]
|
||||
|
||||
Installation :
|
||||
- install list
|
||||
- install [version]
|
||||
Configuration :
|
||||
- config etc [version]
|
||||
- config list
|
||||
- config server *.conf
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
$hostname = exec('echo $HOSTNAME');
|
||||
|
||||
$SPHINX_VERSION = array(
|
||||
'0.9.9' => array('archive'=>'sphinx-0.9.9.tar.gz', 'dir'=>'sphinx-0.9.9'),
|
||||
'1.10' => array('archive'=>'sphinx-1.10-beta.tar.gz', 'dir'=>'sphinx-1.10-beta'),
|
||||
'2.0.8' => array('archive'=>'sphinx-2.0.8-release.tar.gz', 'dir'=>'sphinx-2.0.8-release'),
|
||||
'2.1.2' => array('archive'=>'sphinx-2.1.2-release.tar.gz', 'dir'=>'sphinx-2.1.2-release'),
|
||||
'2.1.7' => array('archive'=>'sphinx-2.1.7-release.tar.gz', 'dir'=>'sphinx-2.1.7-release'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Nécessaire :
|
||||
* ============
|
||||
* GCC : gcc g++ make
|
||||
* MySQL : libmysqld-dev
|
||||
*
|
||||
* tree
|
||||
*
|
||||
*/
|
||||
|
||||
if ($argv[1]=='install')
|
||||
{
|
||||
//Version
|
||||
if (!array_key_exists($argv[2], $SPHINX_VERSION)){
|
||||
echo "Erreur.\n"; exit;
|
||||
}
|
||||
$version = $argv[2];
|
||||
|
||||
//Vérification nécessaires
|
||||
|
||||
//Compilation
|
||||
$cmd = array();
|
||||
$cmd[] = "tar xzvf ".$SPHINX_VERSION[$version]['archive'];
|
||||
$cmd[] = "cp libstemmer_c.tgz ".$SPHINX_VERSION[$version]['dir']."/";
|
||||
|
||||
foreach($cmd as $c){
|
||||
passthru($c);
|
||||
}
|
||||
|
||||
//Changement du répertoire pour la compilation
|
||||
chdir($SPHINX_VERSION[$version]['dir']);
|
||||
|
||||
$cmd = array();
|
||||
$cmd[] = "tar xzvf libstemmer_c.tgz";
|
||||
$cmd[] = "./configure --with-libstemmer --prefix=/usr/local/sphinx";
|
||||
$cmd[] = "make";
|
||||
$cmd[] = "make install";
|
||||
foreach($cmd as $c){
|
||||
passthru($c);
|
||||
}
|
||||
}
|
||||
|
||||
if ($argv[1]=='config')
|
||||
{
|
||||
//Initscript
|
||||
if ($argv[2]=='etc') {
|
||||
$version = $argv[3];
|
||||
exec("cp -vRi scripts/build/$version/etc/* /etc/");
|
||||
exit;
|
||||
}
|
||||
|
||||
//Liste des configurations
|
||||
if ($argv[2]=='list') {
|
||||
echo passthru("tree config/".$hostname."/");
|
||||
exit;
|
||||
}
|
||||
|
||||
//Configuration
|
||||
$server = $argv[2];
|
||||
if (!file_exists("config/".$hostname."/".$server)){
|
||||
echo "Erreur\n"; exit;
|
||||
}
|
||||
|
||||
$concat = '';
|
||||
for($i=3;$i<count($argv);$i++){
|
||||
$concat.= " config/".$hostname."/".$server."/".$argv[$i];
|
||||
}
|
||||
exec("cat config/".$hostname."/sphinx.conf".$concat." > /etc/sphinxsearch/sphinx.conf");
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
#
|
||||
# Settings for the sphinxsearch searchd daemon
|
||||
# Please read /usr/share/doc/sphinxsearch/README.Debian for details.
|
||||
#
|
||||
|
||||
# Should sphinxsearch run automatically on startup? (default: no)
|
||||
# Before doing this you might want to modify /etc/sphinxsearch/sphinx.conf
|
||||
# so that it works for you.
|
||||
START=yes
|
||||
|
@ -1 +0,0 @@
|
||||
/lib/init/upstart-job
|
@ -1,34 +0,0 @@
|
||||
# SphinxSearch Service
|
||||
|
||||
description "SphinxSearch Daemon"
|
||||
author "Andrey Aksyonoff <shodan@sphinxsearch.com>"
|
||||
|
||||
start on (net-device-up
|
||||
and local-filesystems
|
||||
and runlevel [2345])
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 35
|
||||
|
||||
# The default of 5 seconds is too low if we have rt indices and have to flush them
|
||||
kill timeout 30
|
||||
|
||||
env DEFAULTFILE="/etc/default/sphinxsearch"
|
||||
pre-start script
|
||||
if [ -f "$DEFAULTFILE" ]; then
|
||||
. "$DEFAULTFILE"
|
||||
fi
|
||||
if [ "z$START" != "zyes" ]; then
|
||||
stop
|
||||
logger "To enable sphinxsearch, edit /etc/default/sphinxsearch and set START=yes"
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -f /etc/sphinxsearch/sphinx.conf ]; then
|
||||
logger "Please create an /etc/sphinxsearch/sphinx.conf configuration file."
|
||||
logger "Templates are in the /etc/sphinxsearch/ directory."
|
||||
exit 0
|
||||
fi
|
||||
end script
|
||||
|
||||
exec /usr/local/sphinx/bin/searchd --nodetach --config /etc/sphinxsearch/sphinx.conf
|
@ -1,8 +0,0 @@
|
||||
/dbs/sphinxlog/indexer.log {
|
||||
missingok
|
||||
notifempty
|
||||
weekly
|
||||
rotate 5
|
||||
compress
|
||||
delaycompress
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
/dbs/sphinxlog/query.log /dbs/sphinxlog/searchd.log {
|
||||
missingok
|
||||
notifempty
|
||||
weekly
|
||||
rotate 5
|
||||
compress
|
||||
delaycompress
|
||||
create 640 root root
|
||||
postrotate
|
||||
killall -SIGUSR1 searchd
|
||||
endscript
|
||||
}
|
Loading…
Reference in New Issue
Block a user