Compare commits
74 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a37ff8277e | ||
|
8f6adbf77b | ||
|
21699effe5 | ||
|
f46036bf15 | ||
|
8dd7fc655d | ||
|
c92efda6c9 | ||
|
4834d09b10 | ||
|
65dc900149 | ||
|
fdd101fb60 | ||
|
3e354aaf00 | ||
|
e7acccd1fc | ||
|
d6eab21720 | ||
|
61323d1aaa | ||
|
d6a5260603 | ||
|
3cd79992d6 | ||
|
b019f6b269 | ||
|
ee8aaf436f | ||
|
9370ce5b7f | ||
|
f5bf1ca954 | ||
|
15b729dc1a | ||
|
eb735dd8b0 | ||
|
c2a364876c | ||
|
79d7c48d1b | ||
|
b7ca8386c0 | ||
|
34e9a95f55 | ||
|
7ebb5e4f59 | ||
|
d746921f2c | ||
|
e48e5abf88 | ||
|
3dfa1cecc0 | ||
|
8c57e258f9 | ||
|
0c8f40021b | ||
|
8a1d8968e1 | ||
|
ea60f839b3 | ||
|
0ef53f655b | ||
|
52bb42c7f8 | ||
|
8f021d2940 | ||
|
cec500da25 | ||
|
82082142e8 | ||
|
d6d9740994 | ||
|
421cfcc7c7 | ||
|
36ed0557c0 | ||
|
0b493221fe | ||
|
3044222751 | ||
|
70c67fa13f | ||
|
07feda39b8 | ||
|
95e62ac7d3 | ||
|
b043b4b9d2 | ||
|
8e9c2f9263 | ||
|
aac6d30ef4 | ||
|
ea1a866793 | ||
|
d0939bb802 | ||
|
a07f80653f | ||
|
ae8bcce45d | ||
|
4edb8da2f8 | ||
|
5b3f2444cb | ||
|
0b769d7418 | ||
|
ed4da858c2 | ||
|
05636152b6 | ||
|
3cba6c858a | ||
|
37eecfc9f6 | ||
|
8741499eeb | ||
|
3998d173b8 | ||
|
a088ba0d08 | ||
|
edcc2c92df | ||
|
ee0d2d1a22 | ||
|
aa84d0ecbe | ||
|
d3de8de471 | ||
|
0659f8af06 | ||
|
d09fbcf260 | ||
|
b4fec556bd | ||
|
eeadf3270f | ||
|
2144578483 | ||
|
008dd25eb3 | ||
|
2e82a4004d |
137
Sphinx.sh
137
Sphinx.sh
@ -1,137 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
allVersion=("2.0.1" "0.9.9" "2.0.2")
|
|
||||||
declare -A ERREURS
|
|
||||||
declare -A ASTUCES
|
|
||||||
|
|
||||||
declare -A ASTUCESDEV
|
|
||||||
|
|
||||||
ROUGE="\\033[1;31m"
|
|
||||||
NORMAL="\\033[0;39m"
|
|
||||||
CYAN="\\033[1;36m"
|
|
||||||
VERT="\\033[1;32m"
|
|
||||||
BOLD="\\033[1m"
|
|
||||||
UNDERLINE="\\033[4m"
|
|
||||||
TEXTNONE="\\033[0m"
|
|
||||||
|
|
||||||
#Var
|
|
||||||
dir="Exist"
|
|
||||||
log="Exist"
|
|
||||||
dbs="Exist"
|
|
||||||
sphinx="Exist"
|
|
||||||
sphinxlog="Exist"
|
|
||||||
|
|
||||||
ERREURS=(
|
|
||||||
["CHMOD"]="Execute the script with SUDO or in ROOT"
|
|
||||||
["DIRECTORY"]="Directory not create"
|
|
||||||
["CMD"]="This command not exist"
|
|
||||||
["NOCMD"]="Please enter options")
|
|
||||||
|
|
||||||
ASTUCES=(
|
|
||||||
["CREATE"]="Sphinx --create (prepare l'environement)");
|
|
||||||
|
|
||||||
function loadIndication() {
|
|
||||||
while [ -d "/proc/$1" ]
|
|
||||||
do #Current PID in /proc
|
|
||||||
echo -en "Loading... /\033[1G"; sleep .07
|
|
||||||
echo -en "Loading... -\033[1G"; sleep .07
|
|
||||||
echo -en "Loading... / \033[1G"; sleep .07
|
|
||||||
echo -en "Loading... |\033[1G"; sleep .07
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ `id -u` = 0 ] #Need Root or Sudo
|
|
||||||
then
|
|
||||||
commande=('--install' '--all')
|
|
||||||
for i; do
|
|
||||||
case $i in
|
|
||||||
'--help')
|
|
||||||
echo -e $ROUGE"*************************************************************************************************************************************"$NORMAL
|
|
||||||
echo -e "--install version : Vous permet d'installer configurer et crée les indexe et la libstemmer compilation, installation et configuration";
|
|
||||||
echo -e "--delete : Vous permet de restaurer les parametres de la machines en supprimer la configuration et l'installation"
|
|
||||||
echo -e "--version : Vous retournes les dernieres version disponnibles en téléchargement sur Sphinx."
|
|
||||||
echo -e $ROUGE"**************************************************************************************************************************************"$NORMAL
|
|
||||||
exit;
|
|
||||||
;;
|
|
||||||
'--delete')
|
|
||||||
`rm -r indexeConf tmp sphinx-* wget* libste* *~ 2> /dev/null`
|
|
||||||
echo -e "- Clean directory"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
'--version')
|
|
||||||
echo -e "1. Last version : 2.0.1"
|
|
||||||
echo -e "2. Past version : 0.9.9\n"
|
|
||||||
;;
|
|
||||||
'--install')
|
|
||||||
if [ ! -e /dbs ];then echo -e "/dbs not exist !"; exit; fi
|
|
||||||
if [ ! -e tmp ];then `mkdir tmp`; fi
|
|
||||||
if [ ! -e /dbs/sphinx ];then `mkdir /dbs/sphinx`; fi
|
|
||||||
if [ ! -e /usr/local/sphinx ];then `mkdir /dbs/sphinx`; fi
|
|
||||||
if [ ! -e /dbs/sphinxlog ];then `mkdir /dbs/sphinxlog`; fi
|
|
||||||
if [ ! -e /init.d/sphinxsearch ];then `cp initscript/sphinxsearch /etc/init.d/ > /dev/null` ;`chmod +x /etc/init.d/sphinxsearch > /dev/null`; `update-rc.d sphinxsearch defaults > /dev/null`; fi
|
|
||||||
if [ ! -e config/${HOSTNAME} ];then `mkdir config/${HOSTNAME}`;fi
|
|
||||||
if [ ! -e sphinx-2.0.1.tar.gz ] || [ ! -e sphinx-0.9.9.tar.gz ] || [ ! -e sphinx-2.0.2.tar.gz ]
|
|
||||||
then
|
|
||||||
if [ ! -z $2 ]; then
|
|
||||||
if [ $2 == "2.0.1" ]; then
|
|
||||||
version="$2-beta"
|
|
||||||
elif [ $2 == "0.9.9" ]; then
|
|
||||||
version="$2-beta"
|
|
||||||
elif [ $2 == "2.0.2" ]; then
|
|
||||||
version="$2"
|
|
||||||
else
|
|
||||||
echo -e $ROUGE"[Erreur]: This version not exist !"$NORMAL
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
echo -e $CYAN"Download Sphinx-$version..."$NORMAL
|
|
||||||
`wget -b http://sphinxsearch.com/files/sphinx-$version.tar.gz >/dev/null`
|
|
||||||
loadIndication `(ps -C wget -o pid=)`
|
|
||||||
`rm wget-log*`
|
|
||||||
else
|
|
||||||
echo -e $ROUGE"[Erreur]: Please specifie version, exemple 2.0.1 or 0.9.9"$NORMAL
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
`tar -z -xf sphinx-$version.tar.gz -C tmp `
|
|
||||||
`rm sphinx-$version.tar.gz*`
|
|
||||||
echo -e " - Extract files..."
|
|
||||||
echo -e " - Complited"
|
|
||||||
#If libstemmer not installed in tmp/
|
|
||||||
if [ -e libstemmer_c.tgz ]
|
|
||||||
then
|
|
||||||
echo -e $CYAN"Extract file from libstemmer_c..."$NORMAL
|
|
||||||
`mv libstemmer_c.tgz tmp/sphinx-$version/libstemmer_c; cd tmp/sphinx-$version/libstemmer_c/ ; tar -zxf libstemmer_c.tgz`
|
|
||||||
echo -e " - Complited"
|
|
||||||
else
|
|
||||||
echo -e $CYAN"Download and Configure libstemmer..."$NORMAL
|
|
||||||
`cd tmp/sphinx-$version ; wget -b http://snowball.tartarus.org/dist/libstemmer_c.tgz > /dev/null`
|
|
||||||
loadIndication `(ps -C wget -o pid=)`
|
|
||||||
`cd tmp/sphinx-$version ; tar -zxf libstemmer_c.tgz`
|
|
||||||
echo -e "- Complited"
|
|
||||||
fi
|
|
||||||
echo -e "- Extract files..."
|
|
||||||
libstemmer="100%"
|
|
||||||
echo ""
|
|
||||||
echo -e $CYAN"Configuration progress..."$ROUGE
|
|
||||||
`cd tmp/sphinx-$version ; sh configure --with-libstemmer --prefix=/usr/local/sphinx 1> /dev/null `
|
|
||||||
echo -e $NORMAL"- Complited"
|
|
||||||
echo -e $NORMAL
|
|
||||||
echo -e $CYAN"Compilation progress..."$ROUGE
|
|
||||||
if [ $version != "2.0.1-beta" ];then `cd tmp/sphinx-$version ; make; make install ` ;
|
|
||||||
else
|
|
||||||
`cd tmp/sphinx-$version/ ; make; make install`;fi
|
|
||||||
echo -e $NORMAL" - Complited"
|
|
||||||
echo -e $VERT"The installation as been finish ! great ! thank's damien :)"$NORMAL
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#Default
|
|
||||||
echo -e $ROUGE"[Erreur]" ${ERREURS["CMD"]} $NORMAL
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
echo -e $ROUGE"[Erreur]" ${ERREURS["NOCMD"]} $NORMAL
|
|
||||||
else
|
|
||||||
echo -e $ROUGE"[Erreur]" ${ERREURS["CHMOD"]} $NORMAL
|
|
||||||
fi
|
|
@ -1,32 +0,0 @@
|
|||||||
source source_act
|
|
||||||
{
|
|
||||||
type = mysql
|
|
||||||
sql_host = 192.168.78.230
|
|
||||||
sql_user = sphinx
|
|
||||||
sql_pass = indexer
|
|
||||||
sql_db = jo
|
|
||||||
sql_query_pre =
|
|
||||||
sql_query = \
|
|
||||||
SELECT id, Siren1, RaisonSociale, Siren2, actif, dateLien, IF(dateUpdate>dateInsert,dateUpdate,dateInsert) as dateMaj, \
|
|
||||||
source, Pmin*1 AS PminNum, MajMin, PpPm, IF(Pays='','FRA',Pays) AS Pays \
|
|
||||||
FROM liens \
|
|
||||||
WHERE ActionPart=1 AND Siren1>1000 AND Siren1 IN (SELECT DISTINCT SIREN FROM etablissements_old);
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = source
|
|
||||||
sql_attr_uint = PminNum
|
|
||||||
sql_attr_str2ordinal= MajMin
|
|
||||||
sql_attr_str2ordinal= PpPm
|
|
||||||
sql_attr_str2ordinal= Pays
|
|
||||||
}
|
|
||||||
|
|
||||||
index act
|
|
||||||
{
|
|
||||||
source = source_act
|
|
||||||
path = /dbs/sphinx/act
|
|
||||||
docinfo = extern
|
|
||||||
morphology = none
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -1,37 +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;
|
|
||||||
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 = 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,37 +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_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 = 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,40 +0,0 @@
|
|||||||
source ent
|
|
||||||
{
|
|
||||||
type = mysql
|
|
||||||
sql_host = 192.168.78.230
|
|
||||||
sql_user = sphinx
|
|
||||||
sql_pass = indexer
|
|
||||||
sql_db = jo
|
|
||||||
sql_query_pre =
|
|
||||||
sql_query = SELECT id, siren, nic, siege, CONCAT(raisonSociale,\
|
|
||||||
' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \
|
|
||||||
actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \
|
|
||||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
|
||||||
FROM etablissements;
|
|
||||||
sql_attr_str2ordinal = adr_typeVoie
|
|
||||||
sql_attr_uint = siren
|
|
||||||
sql_attr_uint = nic
|
|
||||||
sql_attr_uint = siege
|
|
||||||
sql_attr_uint = adr_num
|
|
||||||
sql_attr_uint = adr_cp
|
|
||||||
sql_attr_uint = adr_dep
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = cj
|
|
||||||
sql_attr_uint = sirenValide
|
|
||||||
sql_attr_uint = rang
|
|
||||||
}
|
|
||||||
|
|
||||||
index ent
|
|
||||||
{
|
|
||||||
source = ent
|
|
||||||
path = /dbs/sphinx/ent
|
|
||||||
docinfo = extern
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
source ent
|
|
||||||
{
|
|
||||||
type = mysql
|
|
||||||
sql_host = 192.168.78.230
|
|
||||||
sql_user = sphinx
|
|
||||||
sql_pass = indexer
|
|
||||||
sql_db = jo
|
|
||||||
sql_query_pre =
|
|
||||||
sql_query = SELECT id, siren, nic, siege, CONCAT(raisonSociale,\
|
|
||||||
' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \
|
|
||||||
actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \
|
|
||||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
|
||||||
FROM etablissements_tmp;
|
|
||||||
sql_attr_str2ordinal = adr_typeVoie
|
|
||||||
sql_attr_uint = siren
|
|
||||||
sql_attr_uint = nic
|
|
||||||
sql_attr_uint = siege
|
|
||||||
sql_attr_uint = adr_num
|
|
||||||
sql_attr_uint = adr_cp
|
|
||||||
sql_attr_uint = adr_dep
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = cj
|
|
||||||
sql_attr_uint = sirenValide
|
|
||||||
sql_attr_uint = rang
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
index ent
|
|
||||||
{
|
|
||||||
source = ent
|
|
||||||
path = /dbs/sphinx/ent
|
|
||||||
docinfo = extern
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
source ent
|
|
||||||
{
|
|
||||||
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, nic, siege, CONCAT(raisonSociale,\
|
|
||||||
' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \
|
|
||||||
actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \
|
|
||||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
|
||||||
FROM etablissements;
|
|
||||||
sql_attr_str2ordinal = adr_typeVoie
|
|
||||||
sql_attr_uint = siren
|
|
||||||
sql_attr_uint = nic
|
|
||||||
sql_attr_uint = siege
|
|
||||||
sql_attr_uint = adr_num
|
|
||||||
sql_attr_uint = adr_cp
|
|
||||||
sql_attr_uint = adr_dep
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = cj
|
|
||||||
sql_attr_uint = sirenValide
|
|
||||||
sql_attr_uint = rang
|
|
||||||
}
|
|
||||||
|
|
||||||
index ent
|
|
||||||
{
|
|
||||||
source = ent
|
|
||||||
path = /dbs/sphinx/ent
|
|
||||||
docinfo = extern
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
source ent
|
|
||||||
{
|
|
||||||
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, nic, siege, CONCAT(raisonSociale,\
|
|
||||||
' "" ',enseigne,' "" ',sigle,' "" ',identite_pre,' "" ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,' ',''),\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.',''),' ',\
|
|
||||||
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(sigle,\
|
|
||||||
'@','A'), '&',' ET '),'/',''),',',''),'-',''),'.','')) AS nom, adr_dep, \
|
|
||||||
actif, adr_num, adr_typeVoie, CONCAT(adr_libVoie,' ',adr_comp) AS adresse, adr_cp, \
|
|
||||||
adr_ville AS ville, cj, ape_etab, (siren>200) AS sirenValide, rang \
|
|
||||||
FROM etablissements_tmp;
|
|
||||||
sql_attr_str2ordinal = adr_typeVoie
|
|
||||||
sql_attr_uint = siren
|
|
||||||
sql_attr_uint = nic
|
|
||||||
sql_attr_uint = siege
|
|
||||||
sql_attr_uint = adr_num
|
|
||||||
sql_attr_uint = adr_cp
|
|
||||||
sql_attr_uint = adr_dep
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = cj
|
|
||||||
sql_attr_uint = sirenValide
|
|
||||||
sql_attr_uint = rang
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
index ent
|
|
||||||
{
|
|
||||||
source = ent
|
|
||||||
path = /dbs/sphinx/ent
|
|
||||||
docinfo = extern
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
source source_act
|
|
||||||
{
|
|
||||||
type = mysql
|
|
||||||
sql_host = 192.168.3.30
|
|
||||||
sql_user = sphinx
|
|
||||||
sql_pass = indexer
|
|
||||||
sql_db = jo
|
|
||||||
sql_query_pre =
|
|
||||||
sql_query = \
|
|
||||||
SELECT id, Siren1, RaisonSociale, Siren2, actif, dateLien, IF(dateUpdate>dateInsert,dateUpdate,dateInsert) as dateMaj, \
|
|
||||||
source, Pmin*1 AS PminNum, MajMin, PpPm, IF(Pays='','FRA',Pays) AS Pays \
|
|
||||||
FROM liens \
|
|
||||||
WHERE ActionPart=1 AND Siren1>1000 AND Siren1 IN (SELECT DISTINCT SIREN FROM etablissements_old);
|
|
||||||
sql_attr_uint = actif
|
|
||||||
sql_attr_uint = source
|
|
||||||
sql_attr_uint = PminNum
|
|
||||||
sql_attr_str2ordinal= MajMin
|
|
||||||
sql_attr_str2ordinal= PpPm
|
|
||||||
sql_attr_str2ordinal= Pays
|
|
||||||
}
|
|
||||||
|
|
||||||
index act
|
|
||||||
{
|
|
||||||
source = source_act
|
|
||||||
path = /dbs/sphinx/act
|
|
||||||
docinfo = extern
|
|
||||||
morphology = none
|
|
||||||
charset_type = sbcs
|
|
||||||
charset_table = 0..9, A..Z->a..z, a..z, \
|
|
||||||
U+23, U+25, U+26, U+2B, U+3D, U+40, \
|
|
||||||
U+C0..U+DE->U+E0..U+FE, U+DF, U+E0..U+FF
|
|
||||||
}
|
|
@ -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_tmp;
|
|
||||||
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,93 +0,0 @@
|
|||||||
<?php
|
|
||||||
Class configure
|
|
||||||
{
|
|
||||||
protected $dirname;
|
|
||||||
protected $sphinx;
|
|
||||||
protected $hostname;
|
|
||||||
|
|
||||||
protected $sql;
|
|
||||||
protected $indexes;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->hostname = exec('echo $(hostname)');
|
|
||||||
$this->sphinx = 'sphinx.conf';
|
|
||||||
$this->dirname = 'config/'.$this->hostname.'/';
|
|
||||||
(file_exists($this->sphinx))?unlink($this->sphinx):'';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function printIndexes($nbServer)
|
|
||||||
{
|
|
||||||
$dir = opendir($this->dirname.$this->sql[$nbServer].'/');
|
|
||||||
$i = 1;
|
|
||||||
|
|
||||||
while($file = readdir($dir)) {
|
|
||||||
$extension = explode('.', $file);
|
|
||||||
if($file != '.' and $file != '..' and $extension[1] == 'conf') {
|
|
||||||
echo "\t\t".'['.$i.'] '. $file."\n";
|
|
||||||
$this->indexes[$i] = $file;$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(count($this->indexes) == 0) {
|
|
||||||
echo "\tAucun indexes dans le repertoire : '".$this->dirname.$this->sql[$nbServer]."' \n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function printMysqlServer()
|
|
||||||
{
|
|
||||||
$dir = opendir($this->dirname);
|
|
||||||
$i = 1;
|
|
||||||
|
|
||||||
while($rep = readdir($dir)) {
|
|
||||||
if($rep != '.' and $rep != '..' and is_dir($this->dirname.$rep)) {
|
|
||||||
echo "\t".'['.$i.'] '.$rep."\n";
|
|
||||||
$this->sql[$i] = $rep;
|
|
||||||
$this->printIndexes($i);
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(count($this->sql) == 0) {
|
|
||||||
echo "\tAucun serveurs dans le repertoire : '".$this->dirname."' \n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function createConfig($mySqlServer, $index)
|
|
||||||
{
|
|
||||||
$dirname = $this->dirname.$mySqlServer.'/';
|
|
||||||
$dir = opendir($dirname);
|
|
||||||
|
|
||||||
if(file_exists($dirname.$index)) {
|
|
||||||
file_put_contents($this->sphinx, file_get_contents($dirname.$index), FILE_APPEND);
|
|
||||||
return (true);
|
|
||||||
}
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function inviteDeCommande()
|
|
||||||
{
|
|
||||||
$handle = fopen('.', 'r');
|
|
||||||
$server = '';
|
|
||||||
|
|
||||||
fwrite(STDOUT, "\n - Serveurs SQL disponnible :\n");
|
|
||||||
$this->printMysqlServer();
|
|
||||||
while($server != "exit\n") {
|
|
||||||
echo "Selectionnez Server et Indexe : ";
|
|
||||||
$server = fgets(STDIN);
|
|
||||||
$indexes = explode(' ', $server);
|
|
||||||
if(isset($this->sql[intval($indexes[0])]) and isset($this->indexes[intval($indexes[1])])) {
|
|
||||||
$this->createConfig($this->sql[intval($indexes[0])], $this->indexes[intval($indexes[1])]);
|
|
||||||
echo 'Indexe ajouté !'."\n";
|
|
||||||
} else
|
|
||||||
echo 'Cet indexe n\'existe pas !'."\n";
|
|
||||||
}
|
|
||||||
file_put_contents($this->sphinx, file_get_contents($this->dirname.$this->sphinx), FILE_APPEND);
|
|
||||||
exec('sudo mv '.$this->sphinx.' /usr/local/sphinx/etc/'.$this->sphinx);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$a = new configure();
|
|
||||||
$a->inviteDeCommande();
|
|
@ -2,8 +2,6 @@
|
|||||||
PATH_BIN=/usr/local/sphinx/bin
|
PATH_BIN=/usr/local/sphinx/bin
|
||||||
PATH_LOG=/dbs/sphinxlog
|
PATH_LOG=/dbs/sphinxlog
|
||||||
|
|
||||||
DATE=`date '+%Y-%m-%d %H-%M-%S'`
|
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 "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerAct-$(date +%F).log
|
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
||||||
$PATH_BIN/indexer --rotate act act_phx >> $PATH_LOG/indexerAct-$(date +%F).log
|
|
||||||
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerAct-$(date +%F).log
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH_BIN=/usr/local/sphinx/bin
|
PATH_BIN=/usr/local/sphinx/bin
|
||||||
PATH_LOG=/dbs/sphinxlog
|
PATH_LOG=/dbs/sphinxlog
|
||||||
|
PATH_SQL=/home/scripts/indexer/sql
|
||||||
|
|
||||||
DATE=`date '+%Y-%m-%d %H-%M-%S'`
|
echo "$(date '+%Y-%m-%d %H:%M:%S') === DEBUT de l'indexation" >> $PATH_LOG/indexer.log
|
||||||
|
|
||||||
echo "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log
|
|
||||||
|
|
||||||
# nombre de lignes dans la table etab
|
# nombre de lignes dans la table etab
|
||||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countDiri.sql)
|
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countDiri.sql)
|
||||||
for line in "$output"; do
|
for line in "$output"; do
|
||||||
etab="$line"
|
etab="$line"
|
||||||
done
|
done
|
||||||
@ -15,7 +14,7 @@ done
|
|||||||
etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
|
etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
|
||||||
|
|
||||||
# nombre de lignes dans la table diri_tmp
|
# nombre de lignes dans la table diri_tmp
|
||||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countDiri_tmp.sql)
|
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countDiri_tmp.sql)
|
||||||
for line in "$output"; do
|
for line in "$output"; do
|
||||||
etab_tmp="$line"
|
etab_tmp="$line"
|
||||||
done
|
done
|
||||||
@ -23,15 +22,18 @@ done
|
|||||||
etab_tmp=$(echo $etab_tmp|sed -e "s/^[etab_tmp ]*//g"||sed -e "s/[ ]*$//g")
|
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)
|
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
|
||||||
if test $etab_tmp -gt $etab; then
|
if [ -z "$etab" ]; then
|
||||||
echo "Il y a $etab_tmp lignes dans la nouvelle table dirigeants ($etab lignes dans l'ancienne)" >> $PATH_LOG/indexerDiri-$(date +%F).log
|
echo "etab = null"
|
||||||
$PATH_BIN/indexer --rotate dir dir_phx >> $PATH_LOG/indexerDiri-$(date +%F).log
|
elif [ -z "$etab_tmp" ]; then
|
||||||
echo "Sphinx - termine : $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log
|
echo "etab_tmp = null"
|
||||||
mysql -f -usphinx -h192.168.3.30 -pindexer jo < sql/finIndexationDiri.sql >> $PATH_LOG/indexerDiri-$(date +%F).log
|
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
|
else
|
||||||
# Il y a plus de lignes dans l'ancienne table dirigeants ==> On ne fait rien
|
# 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/indexerDiri-$(date +%F).log
|
echo "Il n'y a pas assez de lignes dans la nouvelle table dirigeants ($etab_tmp / $etab) !" >> $PATH_LOG/indexer.log
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log
|
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH_BIN=/usr/local/sphinx/bin
|
PATH_BIN=/usr/local/sphinx/bin
|
||||||
PATH_LOG=/dbs/sphinxlog
|
PATH_LOG=/dbs/sphinxlog
|
||||||
|
PATH_SQL=/home/scripts/indexer/sql
|
||||||
|
|
||||||
DATE=`date '+%Y-%m-%d %H-%M-%S'`
|
echo "$(date '+%Y-%m-%d %H:%M:%S') === DEBUT de l'indexation" >> $PATH_LOG/indexer.log
|
||||||
|
|
||||||
echo "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log
|
|
||||||
|
|
||||||
# nombre de lignes dans la table etab
|
# nombre de lignes dans la table etab
|
||||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countEtab.sql)
|
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countEtab.sql)
|
||||||
for line in "$output"; do
|
for line in "$output"; do
|
||||||
etab="$line"
|
etab="$line"
|
||||||
done
|
done
|
||||||
@ -17,7 +16,7 @@ etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
|
|||||||
#etab=$(echo $etab| gawk '{print + 0}')
|
#etab=$(echo $etab| gawk '{print + 0}')
|
||||||
|
|
||||||
# nombre de lignes dans la table etab_tmp
|
# nombre de lignes dans la table etab_tmp
|
||||||
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countEtab_tmp.sql)
|
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < $PATH_SQL/countEtab_tmp.sql)
|
||||||
for line in "$output"; do
|
for line in "$output"; do
|
||||||
etab_tmp="$line"
|
etab_tmp="$line"
|
||||||
done
|
done
|
||||||
@ -27,16 +26,18 @@ etab_tmp=$(echo $etab_tmp|sed -e "s/^[etab_tmp ]*//g"||sed -e "s/[ ]*$//g")
|
|||||||
#etab_tmp=$(echo $etab_tmp| gawk '{print + 0}')
|
#etab_tmp=$(echo $etab_tmp| gawk '{print + 0}')
|
||||||
|
|
||||||
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
|
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
|
||||||
if test $etab_tmp -gt $etab; then
|
if [ -z "$etab" ]; then
|
||||||
echo "Il y a $etab_tmp lignes dans la nouvelle table etablissement ($etab lignes dans l'ancienne)" >> $PATH_LOG/indexerEtab-$(date +%F).log
|
echo "etab = null"
|
||||||
# $PATH_BIN/indexer --rotate --all >> $PATH_LOG/indexer-$(date +%F).log
|
elif [ -z "$etab_tmp" ]; then
|
||||||
$PATH_BIN/indexer --rotate ent ent_mns ent_phx >> $PATH_LOG/indexerEtab-$(date +%F).log
|
echo "etab_tmp = null"
|
||||||
echo "Sphinx - terminé : $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log
|
elif [ $etab_tmp -gt $etab ]; then
|
||||||
mysql -f -usphinx -h192.168.3.30 -pindexer jo < sql/finIndexationEtab.sql >> $PATH_LOG/indexerEtab-$(date +%F).log
|
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
|
else
|
||||||
# Il y a plus de lignes dans l'ancienne table etablissements ==> On ne fait rien
|
# 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/indexerEtab-$(date +%F).log
|
echo "Il n'y a pas assez de lignes dans la nouvelle table etablissement ($etab_tmp / $etab) !" >> $PATH_LOG/indexer.log
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log
|
echo "$(date '+%Y-%m-%d %H:%M:%S') === FIN" >> $PATH_LOG/indexer.log
|
||||||
|
@ -1 +1 @@
|
|||||||
SELECT count(*) AS etab_tmp from dirigeants;
|
SELECT count(*) AS etab from dirigeants;
|
36
indexer/test.sh
Normal file
36
indexer/test.sh
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PATH_BIN=/usr/local/sphinx/bin
|
||||||
|
PATH_LOG=/dbs/sphinxlog
|
||||||
|
PATH_SQL=/home/scripts/indexer/sql
|
||||||
|
|
||||||
|
# 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)"
|
||||||
|
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) !"
|
||||||
|
fi
|
@ -1,147 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
|
||||||
# Modified for Debian
|
|
||||||
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
|
||||||
# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
|
|
||||||
# Modified for sphinx by Radu Spineanu <radu@debian.org>
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: sphinxsearch
|
|
||||||
# Required-Start: $local_fs $remote_fs $syslog $network $time
|
|
||||||
# Required-Stop: $local_fs $remote_fs $syslog $network
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Fast standalone full-text SQL search engine
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
PREFIX=/usr/local/sphinx
|
|
||||||
DATA=/dbs/sphinx
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
DAEMON=$PREFIX/bin/searchd
|
|
||||||
NAME=sphinx
|
|
||||||
DESC=sphinx
|
|
||||||
|
|
||||||
test -x $DAEMON || exit 0
|
|
||||||
|
|
||||||
PIDFILE=/var/log/searchd.pid
|
|
||||||
DODTIME=1 # Time to wait for the server to die, in seconds
|
|
||||||
# If this value is set too low you might not
|
|
||||||
# let some servers to die gracefully and
|
|
||||||
# 'restart' will not work
|
|
||||||
|
|
||||||
# Include sphinx defaults if available
|
|
||||||
if [ -f /etc/default/sphinx ] ; then
|
|
||||||
. /etc/default/sphinx
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
running_pid()
|
|
||||||
{
|
|
||||||
# Check if a given process pid's cmdline matches a given name
|
|
||||||
pid=$1
|
|
||||||
name=$2
|
|
||||||
[ -z "$pid" ] && return 1
|
|
||||||
[ ! -d /proc/$pid ] && return 1
|
|
||||||
cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
|
|
||||||
# Is this the expected child?
|
|
||||||
[ "$cmd" != "$name" ] && return 1
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
running()
|
|
||||||
{
|
|
||||||
# Check if the process is running looking at /proc
|
|
||||||
# (works for all users)
|
|
||||||
|
|
||||||
# No pidfile, probably no daemon present
|
|
||||||
[ ! -f "$PIDFILE" ] && return 1
|
|
||||||
# Obtain the pid and check it against the binary name
|
|
||||||
pid=`cat $PIDFILE`
|
|
||||||
running_pid $pid $DAEMON || return 1
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
force_stop() {
|
|
||||||
# Forcefully kill the process
|
|
||||||
[ ! -f "$PIDFILE" ] && return
|
|
||||||
if running ; then
|
|
||||||
kill -15 $pid
|
|
||||||
# Is it really dead?
|
|
||||||
[ -n "$DODTIME" ] && sleep "$DODTIME"s
|
|
||||||
if running ; then
|
|
||||||
kill -9 $pid
|
|
||||||
[ -n "$DODTIME" ] && sleep "$DODTIME"s
|
|
||||||
if running ; then
|
|
||||||
echo "Cannot kill $LABEL (pid=$pid)!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
rm -f $PIDFILE
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
echo -n "Starting $DESC: "
|
|
||||||
|
|
||||||
# Check if we have the configuration file
|
|
||||||
if [ ! -f /usr/local/sphinx/etc/sphinx.conf ]; then
|
|
||||||
echo "Please create an /usr/local/sphinx/sphinx.conf configuration file."
|
|
||||||
echo "Templates are in the directory."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
start-stop-daemon --start --exec ${DAEMON}
|
|
||||||
if running ; then
|
|
||||||
echo "$NAME."
|
|
||||||
else
|
|
||||||
echo " ERROR."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
echo -n "Stopping $DESC: "
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
|
|
||||||
--exec $DAEMON
|
|
||||||
echo "$NAME."
|
|
||||||
;;
|
|
||||||
force-stop)
|
|
||||||
echo -n "Forcefully stopping $DESC: "
|
|
||||||
force_stop
|
|
||||||
if ! running ; then
|
|
||||||
echo "$NAME."
|
|
||||||
else
|
|
||||||
echo " ERROR."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
echo -n "Restarting $DESC: "
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
|
|
||||||
--exec $DAEMON
|
|
||||||
[ -n "$DODTIME" ] && sleep $DODTIME
|
|
||||||
start-stop-daemon --start --exec ${DAEMON}
|
|
||||||
echo "$NAME."
|
|
||||||
;;
|
|
||||||
|
|
||||||
status)
|
|
||||||
echo -n "$LABEL is "
|
|
||||||
if running ; then
|
|
||||||
echo "running"
|
|
||||||
else
|
|
||||||
echo " not running."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
N=/etc/init.d/$NAME
|
|
||||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
157
scripts/build/config/Odea/MySqlServer/ciblage.conf
Normal file
157
scripts/build/config/Odea/MySqlServer/ciblage.conf
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
|
||||||
|
source ciblage
|
||||||
|
{
|
||||||
|
type = mysql
|
||||||
|
sql_host = 192.168.3.30
|
||||||
|
sql_user = sphinx
|
||||||
|
sql_pass = indexer
|
||||||
|
sql_db = jo
|
||||||
|
sql_query_pre = SET NAMES utf8
|
||||||
|
sql_query = \
|
||||||
|
SELECT id, LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') AS nic, \
|
||||||
|
siege, \
|
||||||
|
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
|
||||||
|
}
|
@ -7,7 +7,7 @@ indexer
|
|||||||
{
|
{
|
||||||
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
|
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
|
||||||
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
|
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
|
||||||
mem_limit = 2047M
|
mem_limit = 256M
|
||||||
|
|
||||||
# maximum IO calls per second (for I/O throttling)
|
# maximum IO calls per second (for I/O throttling)
|
||||||
# optional, default is 0 (unlimited)
|
# optional, default is 0 (unlimited)
|
||||||
@ -69,9 +69,11 @@ searchd
|
|||||||
|
|
||||||
# whether to forcibly preopen all indexes on startup
|
# whether to forcibly preopen all indexes on startup
|
||||||
# optional, default is 0 (do not preopen)
|
# optional, default is 0 (do not preopen)
|
||||||
preopen_indexes = 0
|
preopen_indexes = 1
|
||||||
|
|
||||||
# whether to unlink .old index copies on succesful rotation.
|
# whether to unlink .old index copies on succesful rotation.
|
||||||
# optional, default is 1 (do unlink)
|
# optional, default is 1 (do unlink)
|
||||||
unlink_old = 1
|
unlink_old = 1
|
||||||
|
|
||||||
|
compat_sphinxql_magics=0
|
||||||
}
|
}
|
90
scripts/build/config/Sphinx/DOC
Normal file
90
scripts/build/config/Sphinx/DOC
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
La base de données doit communiqué en UTF-8
|
||||||
|
|
||||||
|
sql_query_pre = SET NAMES utf8
|
||||||
|
charset_type = utf-8
|
||||||
|
|
||||||
|
# 'utf-8' defaults for English and Russian
|
||||||
|
charset_table = 0..9, A..Z->a..z, _, a..z, \
|
||||||
|
U+410..U+42F->U+430..U+44F, U+430..U+44F
|
||||||
|
|
||||||
|
# For french
|
||||||
|
charset_table = 0..9, A..Z->a..z, a..z, \
|
||||||
|
U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, \
|
||||||
|
U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, \
|
||||||
|
U+0152->U+0153, U+0153 \
|
||||||
|
|
||||||
|
Morphology
|
||||||
|
==========
|
||||||
|
# builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru',
|
||||||
|
# 'soundex', and 'metaphone'; additional preprocessors available from
|
||||||
|
# libstemmer are 'libstemmer_XXX', where XXX is algorithm code
|
||||||
|
# (see libstemmer_c/libstemmer/modules.txt)
|
||||||
|
|
||||||
|
morphology = libstemmer_french
|
||||||
|
|
||||||
|
Taille minimum des mots ou l'on applique la morphology
|
||||||
|
min_stemming_len = 4
|
||||||
|
|
||||||
|
|
||||||
|
According to libstimmer.c/libstimmer/modules.txt, the french module can be refered to by either
|
||||||
|
french, fr, fre, fra... french UTF_8,ISO_8859_1 french,fr,fre,fra
|
||||||
|
|
||||||
|
|
||||||
|
Utilisation des stopwords
|
||||||
|
=========================
|
||||||
|
un, une, le, la, les, de, des, du, dans, l', d', @
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Utilisation des wordforms
|
||||||
|
=========================
|
||||||
|
Appliquer après les règles de charset_table
|
||||||
|
Stemming n'est pas appliquer à ces mots , ils deviennent des exceptions
|
||||||
|
|
||||||
|
Les mots définis sont utilisé pour normalisé les mots durant l'indexation et la recherche,
|
||||||
|
il est donc nécessaire de réindexé et redémarrer la recherche pour appliquer les changements
|
||||||
|
|
||||||
|
Divers
|
||||||
|
------
|
||||||
|
|
||||||
|
& > ET
|
||||||
|
|
||||||
|
Les chiffres
|
||||||
|
------------
|
||||||
|
|
||||||
|
un > 1
|
||||||
|
deux > 2
|
||||||
|
trois > 3
|
||||||
|
quatre > 4
|
||||||
|
cinq > 5
|
||||||
|
six > 6
|
||||||
|
sept > 7
|
||||||
|
huit > 8
|
||||||
|
neuf > 9
|
||||||
|
dix > 10
|
||||||
|
onze > 11
|
||||||
|
douze > 12
|
||||||
|
treize > 13
|
||||||
|
quatorze > 14
|
||||||
|
quinze > 15
|
||||||
|
seize > 16
|
||||||
|
vingt > 20
|
||||||
|
vingts > 20
|
||||||
|
trente > 30
|
||||||
|
quarante > 40
|
||||||
|
cinquante > 50
|
||||||
|
soixante > 60
|
||||||
|
quatrevingt > 80
|
||||||
|
cent > 100
|
||||||
|
cents > 100
|
||||||
|
mille > 1000
|
||||||
|
|
||||||
|
Les chiffres romain
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
|
||||||
|
Les éléments de voies et abbréviations
|
||||||
|
--------------------------------------
|
||||||
|
Voir le wordforms
|
42
scripts/build/config/Sphinx/Dev/act.conf
Normal file
42
scripts/build/config/Sphinx/Dev/act.conf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
157
scripts/build/config/Sphinx/Dev/ciblage.conf
Normal file
157
scripts/build/config/Sphinx/Dev/ciblage.conf
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
110
scripts/build/config/Sphinx/Dev/ciblage.txt
Normal file
110
scripts/build/config/Sphinx/Dev/ciblage.txt
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
#############################################################################
|
||||||
|
# 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 =>
|
||||||
|
#############################################################################
|
64
scripts/build/config/Sphinx/Dev/dir.conf
Normal file
64
scripts/build/config/Sphinx/Dev/dir.conf
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
63
scripts/build/config/Sphinx/Dev/dirtmp.conf
Normal file
63
scripts/build/config/Sphinx/Dev/dirtmp.conf
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
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
|
||||||
|
}
|
74
scripts/build/config/Sphinx/Dev/ent.conf
Normal file
74
scripts/build/config/Sphinx/Dev/ent.conf
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
74
scripts/build/config/Sphinx/Dev/enttmp.conf
Normal file
74
scripts/build/config/Sphinx/Dev/enttmp.conf
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
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,9 +1,10 @@
|
|||||||
|
|
||||||
source histo
|
source histo
|
||||||
{
|
{
|
||||||
type = mysql
|
type = mysql
|
||||||
sql_host = 192.168.78.230
|
sql_host = 192.168.78.230
|
||||||
sql_user = sphinx_histo
|
sql_user = sphinx
|
||||||
sql_pass = sphinx
|
sql_pass = indexer
|
||||||
sql_db = histobodacc
|
sql_db = histobodacc
|
||||||
sql_port = 3306 # optional, default is 3306
|
sql_port = 3306 # optional, default is 3306
|
||||||
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
||||||
@ -14,10 +15,10 @@ source histo
|
|||||||
index histo
|
index histo
|
||||||
{
|
{
|
||||||
source = histo
|
source = histo
|
||||||
path = /home/sphinx/histo
|
path = /dbs/sphinx/histo
|
||||||
docinfo = extern
|
docinfo = extern
|
||||||
morphology = none
|
morphology = none
|
||||||
min_word_len = 1
|
min_word_len = 2
|
||||||
charset_type = sbcs
|
charset_type = sbcs
|
||||||
html_strip = 1
|
html_strip = 1
|
||||||
}
|
}
|
73
scripts/build/config/Sphinx/MysqlServer/ent.conf
Normal file
73
scripts/build/config/Sphinx/MysqlServer/ent.conf
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
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
|
||||||
|
}
|
73
scripts/build/config/Sphinx/MysqlServer/enttmp.conf
Normal file
73
scripts/build/config/Sphinx/MysqlServer/enttmp.conf
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
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
|
||||||
|
}
|
79
scripts/build/config/Sphinx/sphinx.conf
Normal file
79
scripts/build/config/Sphinx/sphinx.conf
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
|
||||||
|
#############################################################################
|
||||||
|
## indexer settings
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
indexer
|
||||||
|
{
|
||||||
|
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
|
||||||
|
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
|
||||||
|
mem_limit = 256M
|
||||||
|
|
||||||
|
# maximum IO calls per second (for I/O throttling)
|
||||||
|
# optional, default is 0 (unlimited)
|
||||||
|
#
|
||||||
|
# max_iops = 40
|
||||||
|
|
||||||
|
|
||||||
|
# maximum IO call size, bytes (for I/O throttling)
|
||||||
|
# optional, default is 0 (unlimited)
|
||||||
|
#
|
||||||
|
# max_iosize = 1048576
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
## searchd settings
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
searchd
|
||||||
|
{
|
||||||
|
# IP address to bind on
|
||||||
|
# optional, default is 0.0.0.0 (ie. listen on all interfaces)
|
||||||
|
#
|
||||||
|
# address = 127.0.0.1
|
||||||
|
# address = 192.168.0.1
|
||||||
|
|
||||||
|
|
||||||
|
# searchd TCP port number
|
||||||
|
# mandatory, default is 3312
|
||||||
|
listen = 3312
|
||||||
|
|
||||||
|
# log file, searchd run info is logged here
|
||||||
|
# optional, default is 'searchd.log'
|
||||||
|
log = /dbs/sphinxlog/searchd.log
|
||||||
|
|
||||||
|
# query log file, all search queries are logged here
|
||||||
|
# optional, default is empty (do not log queries)
|
||||||
|
query_log = /dbs/sphinxlog/query.log
|
||||||
|
|
||||||
|
# client read timeout, seconds
|
||||||
|
# optional, default is 5
|
||||||
|
read_timeout = 5
|
||||||
|
|
||||||
|
# maximum amount of children to fork (concurrent searches to run)
|
||||||
|
# optional, default is 0 (unlimited)
|
||||||
|
max_children = 30
|
||||||
|
|
||||||
|
# PID file, searchd process ID file name
|
||||||
|
# mandatory
|
||||||
|
pid_file = /var/log/searchd.pid
|
||||||
|
|
||||||
|
# max amount of matches the daemon ever keeps in RAM, per-index
|
||||||
|
# WARNING, THERE'S ALSO PER-QUERY LIMIT, SEE SetLimits() API CALL
|
||||||
|
# default is 1000 (just like Google)
|
||||||
|
max_matches = 1000
|
||||||
|
|
||||||
|
# seamless rotate, prevents rotate stalls if precaching huge datasets
|
||||||
|
# optional, default is 1
|
||||||
|
seamless_rotate = 1
|
||||||
|
|
||||||
|
# whether to forcibly preopen all indexes on startup
|
||||||
|
# optional, default is 0 (do not preopen)
|
||||||
|
preopen_indexes = 1
|
||||||
|
|
||||||
|
# whether to unlink .old index copies on succesful rotation.
|
||||||
|
# optional, default is 1 (do unlink)
|
||||||
|
unlink_old = 1
|
||||||
|
|
||||||
|
compat_sphinxql_magics=0
|
||||||
|
}
|
207
scripts/build/config/Sphinx/wordforms-ent.txt
Normal file
207
scripts/build/config/Sphinx/wordforms-ent.txt
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
& > et
|
||||||
|
un > 1
|
||||||
|
deux > 2
|
||||||
|
trois > 3
|
||||||
|
quatre > 4
|
||||||
|
cinq > 5
|
||||||
|
six > 6
|
||||||
|
sept > 7
|
||||||
|
huit > 8
|
||||||
|
neuf > 9
|
||||||
|
dix > 10
|
||||||
|
onze > 11
|
||||||
|
douze > 12
|
||||||
|
treize > 13
|
||||||
|
quatorze > 14
|
||||||
|
quinze > 15
|
||||||
|
seize > 16
|
||||||
|
vingt > 20
|
||||||
|
vingts > 20
|
||||||
|
trente > 30
|
||||||
|
quarante > 40
|
||||||
|
cinquante > 50
|
||||||
|
soixante > 60
|
||||||
|
quatrevingt > 80
|
||||||
|
cent > 100
|
||||||
|
cents > 100
|
||||||
|
mille > 1000
|
||||||
|
zac > zone
|
||||||
|
zad > zone
|
||||||
|
za > zone
|
||||||
|
zi > zone
|
||||||
|
zup > zone
|
||||||
|
general > gal
|
||||||
|
abbaye > abe
|
||||||
|
agglomeration > agl
|
||||||
|
aglo > agl
|
||||||
|
allee > all
|
||||||
|
ancien > ach
|
||||||
|
ancienne > art
|
||||||
|
anse > anse
|
||||||
|
arcade > arc
|
||||||
|
autoroute > aut
|
||||||
|
avenue > av
|
||||||
|
barriere > bre
|
||||||
|
bas > bch
|
||||||
|
bastide > bstd
|
||||||
|
baston > bast
|
||||||
|
beguinage > begi
|
||||||
|
berge > ber
|
||||||
|
bois > bois
|
||||||
|
boite postal > bp
|
||||||
|
boucle > bcle
|
||||||
|
boulevard > bd
|
||||||
|
bourg > brg
|
||||||
|
butte > but
|
||||||
|
campagne > cgne
|
||||||
|
camping > cpg
|
||||||
|
carre > carr
|
||||||
|
carreau > cau
|
||||||
|
carrefour > car
|
||||||
|
carriere > care
|
||||||
|
castel > cst
|
||||||
|
cavee > cav
|
||||||
|
central > ctre
|
||||||
|
centre > ctre
|
||||||
|
chalet > chl
|
||||||
|
chapelle > chp
|
||||||
|
charmille > chi
|
||||||
|
chateau > cht
|
||||||
|
chaussee > chs
|
||||||
|
che > chemin
|
||||||
|
chv > chemin
|
||||||
|
cheminement > chem
|
||||||
|
cloitre > cloi
|
||||||
|
colline > coli
|
||||||
|
contour > ctr
|
||||||
|
corniche > cor
|
||||||
|
cottage > cott
|
||||||
|
cours > crs
|
||||||
|
darse > dars
|
||||||
|
degre > deg
|
||||||
|
dsg > descente
|
||||||
|
dsc > descente
|
||||||
|
digue > dig
|
||||||
|
domaine > dom
|
||||||
|
docteur > dr
|
||||||
|
ecart > eca
|
||||||
|
ecluse > ecl
|
||||||
|
eglise > egl
|
||||||
|
enceinte > en
|
||||||
|
enclave > env
|
||||||
|
enclos > enc
|
||||||
|
escalier > esc
|
||||||
|
espace > espa
|
||||||
|
esplanade > esp
|
||||||
|
etang > eting
|
||||||
|
faubourg > fg
|
||||||
|
ferme > frm
|
||||||
|
fontaine > fon
|
||||||
|
fort > fort
|
||||||
|
forum > form
|
||||||
|
fosse > fos
|
||||||
|
foyer > foyr
|
||||||
|
galerie > gal
|
||||||
|
garenne > garn
|
||||||
|
grand > gbd
|
||||||
|
gden > grande
|
||||||
|
gr > grande
|
||||||
|
grille > gri
|
||||||
|
grimpette > grim
|
||||||
|
groupe > gpe
|
||||||
|
groupement > gpt
|
||||||
|
halle > hle
|
||||||
|
hameau > ham
|
||||||
|
haut > hch
|
||||||
|
hippodrome > hip
|
||||||
|
immeuble > imm
|
||||||
|
impasse > imp
|
||||||
|
jardin > jard
|
||||||
|
jetee > jte
|
||||||
|
levee > leve
|
||||||
|
lieu > ld
|
||||||
|
lieudit > ld
|
||||||
|
lotissement > lot
|
||||||
|
maison > mf
|
||||||
|
manoir > man
|
||||||
|
marche > mar
|
||||||
|
metro > met
|
||||||
|
montee > mte
|
||||||
|
moulin > mln
|
||||||
|
musee > mus
|
||||||
|
nouvelle > nte
|
||||||
|
palais > pal
|
||||||
|
parc > parc
|
||||||
|
parking > pkg
|
||||||
|
parvis > prv
|
||||||
|
pas > passage
|
||||||
|
pn > passage
|
||||||
|
passe > pass
|
||||||
|
passerelle > ple
|
||||||
|
patio > pat
|
||||||
|
pavillon > pav
|
||||||
|
peripherique > peri
|
||||||
|
peristyle > psty
|
||||||
|
petites > pta
|
||||||
|
pae > petite
|
||||||
|
pim > petite
|
||||||
|
prt > petite
|
||||||
|
ptr > petite
|
||||||
|
place > pl
|
||||||
|
placis > plci
|
||||||
|
plage > plag
|
||||||
|
plaine > pln
|
||||||
|
plan > plan
|
||||||
|
plateau > plt
|
||||||
|
pointe > pnt
|
||||||
|
porche > pch
|
||||||
|
porte > pte
|
||||||
|
portique > porq
|
||||||
|
poterne > pot
|
||||||
|
pourtour > pour
|
||||||
|
presqu ile > prq
|
||||||
|
promenade > prom
|
||||||
|
quai > qu
|
||||||
|
quartier > qua
|
||||||
|
raccourci > rac
|
||||||
|
raidillon > raid
|
||||||
|
rampe > rpe
|
||||||
|
rempart > rem
|
||||||
|
residence > res
|
||||||
|
rocade > roc
|
||||||
|
rond > rpt
|
||||||
|
roquet > roqt
|
||||||
|
rotonde > rtd
|
||||||
|
route > rte
|
||||||
|
rue > r
|
||||||
|
ruelle > rle
|
||||||
|
sente > sen
|
||||||
|
sentier > sen
|
||||||
|
square > sq
|
||||||
|
st > saint
|
||||||
|
ste > saint
|
||||||
|
sainte > saint
|
||||||
|
stade > stde
|
||||||
|
station > sta
|
||||||
|
terre > tpl
|
||||||
|
terrain > trn
|
||||||
|
terrasse > tsse
|
||||||
|
tertre > trt
|
||||||
|
traverse > tra
|
||||||
|
vallon > val
|
||||||
|
vallee > val
|
||||||
|
venelle > ven
|
||||||
|
vieille > vte
|
||||||
|
villa > vla
|
||||||
|
vge > village
|
||||||
|
vlge > village
|
||||||
|
voie > voi
|
||||||
|
centre cial > ccal
|
||||||
|
centre com > ccal
|
||||||
|
centre comm > ccal
|
||||||
|
centre commercial > ccal
|
||||||
|
ville > mairie
|
||||||
|
commune > mairie
|
||||||
|
conseil regional > region
|
||||||
|
conseil general > departement
|
||||||
|
companie > cie
|
41
scripts/build/config/SphinxHisto/MysqlServer/act.conf
Normal file
41
scripts/build/config/SphinxHisto/MysqlServer/act.conf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
44
scripts/build/config/SphinxHisto/MysqlServer/dirtmp.conf
Normal file
44
scripts/build/config/SphinxHisto/MysqlServer/dirtmp.conf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
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
|
||||||
|
}
|
97
scripts/build/configure.php
Normal file
97
scripts/build/configure.php
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
#!/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");
|
||||||
|
}
|
||||||
|
|
10
scripts/build/ubuntu-12.04/etc/default/sphinxsearch
Normal file
10
scripts/build/ubuntu-12.04/etc/default/sphinxsearch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
# 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
scripts/build/ubuntu-12.04/etc/init.d/sphinxsearch
Normal file
1
scripts/build/ubuntu-12.04/etc/init.d/sphinxsearch
Normal file
@ -0,0 +1 @@
|
|||||||
|
/lib/init/upstart-job
|
34
scripts/build/ubuntu-12.04/etc/init/sphinxsearch.conf
Normal file
34
scripts/build/ubuntu-12.04/etc/init/sphinxsearch.conf
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# 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
|
8
scripts/build/ubuntu-12.04/etc/logrotate.d/indexer
Normal file
8
scripts/build/ubuntu-12.04/etc/logrotate.d/indexer
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/dbs/sphinxlog/indexer.log {
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
weekly
|
||||||
|
rotate 5
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user