Modification du script
This commit is contained in:
parent
660e9daeef
commit
8a1ee1e691
177
Sphinx.sh
177
Sphinx.sh
@ -1,12 +1,17 @@
|
||||
#!/bin/bash
|
||||
#This program as been create by Damien for Scores et decisions ste
|
||||
#Email : dlasserre@scores-decisions.com
|
||||
|
||||
source Programme/parametres.sh
|
||||
source Programme/function.sh
|
||||
|
||||
allVersion=("2.0.1" "0.9.9")
|
||||
source='files/description.list'
|
||||
|
||||
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
|
||||
@ -26,19 +31,16 @@ then
|
||||
echo -e "2. Past version : 0.9.9\n"
|
||||
;;
|
||||
'--install')
|
||||
#Environement for installation
|
||||
if [ ! -e indexeConf ];then `mkdir indexeConf`; indexeConf="Success"; fi
|
||||
`touch indexeConf/sphinx.conf`
|
||||
sphinxconf="Success"
|
||||
#Environement for installation
|
||||
if [ ! -e /dbs ];then `mkdir /dbs`; dbs="Success"; fi
|
||||
|
||||
#repertoire temporaire.
|
||||
if [ ! -e tmp ];then `mkdir tmp`; fi
|
||||
##
|
||||
|
||||
if [ ! -e /dbs/sphinx ];then `mkdir /dbs/sphinx`; sphinx="Success"; fi
|
||||
if [ ! -e /dbs/sphinxlog ];then `mkdir /dbs/sphinxlog`; sphinxlog="Success"; fi
|
||||
if [ ! -e /init.d/sphinxsearch ];then `cp initscript/sphinxsearch /etc/init.d/; update-rc.d sphinxsearch defaults`;sphinxinit="Success"; fi
|
||||
if [ ! -e /dbs/sphinx ];then echo -e "/dbs/sphinx Doesn't exist !"; exit; fi
|
||||
if [ ! -e /dbs/sphinxlog ];then echo -e "/dbs/sphinxlog Doesn't exist !"; exit; fi
|
||||
if [ ! -e /usr/local/sphinx ];then echo -e "/usr/local/sphinx Doesn't exist !"; exit; fi
|
||||
if [ ! -e /init.d/sphinxsearch ];then `cp initscript/sphinxsearch /etc/init.d/; update-rc.d sphinxsearch defaults`; fi
|
||||
#Check if package in directory, if you want to download manually the package
|
||||
if [ ! -e sphinx-2.0.1.tar.gz ] || [ ! -e sphinx-0.9.9.tar.gz ]
|
||||
then
|
||||
@ -64,21 +66,20 @@ then
|
||||
`rm sphinx-$version.tar.gz*`
|
||||
echo -e " - Extract files..."
|
||||
echo -e " - Complited"
|
||||
#If libstemmer not installed in tmp/
|
||||
#If libstemmer not installed in tmp/
|
||||
if [ -e libstemmer_c.tgz ]
|
||||
then
|
||||
echo -e $CYAN"Extract file from libstemmer_c..."$NORMAL
|
||||
`cd tmp/sphinx-$version ; tar -zxf libstemmer_c.tgz`
|
||||
`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..."
|
||||
`cd tmp/sphinx-$version ; tar -zxf libstemmer_c.tgz`
|
||||
echo -e "- Complited"
|
||||
`cd tmp/sphinx-$version ; rm libstemmer_c.tgz`
|
||||
libstemmer="100%"
|
||||
echo ""
|
||||
echo -e $CYAN"Configuration progress..."$ROUGE
|
||||
@ -86,136 +87,36 @@ then
|
||||
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 ` ;fi
|
||||
#Make and install binary.
|
||||
#`cd tmp/sphinx-$version/ ; make install 1> /dev/null`
|
||||
#if [ $version != "2.0.1-beta" ];then `cd tmp/sphinx-$version ; make ` ;
|
||||
#else
|
||||
#`cd tmp/sphinx-$version/ ; make install 1> /dev/null`;fi
|
||||
echo -e $NORMAL" - Complited"
|
||||
echo ""
|
||||
echo -e $CYAN"Visualisation"$NORMAL
|
||||
echo -e "---------------------------------------------------------------------------------------"
|
||||
echo -e "2. Directory : indexeConf " $VERT $indexeConf $NORMAL
|
||||
echo -e "3. Directory : /dbs " $VERT $dbs $NORMAL
|
||||
echo -e "4. Directory : /dbs/sphinx " $VERT $sphinx $NORMAL
|
||||
echo -e "5. Directory : /dbs/sphinxlog " $VERT $sphinxlog $NORMAL
|
||||
echo -e "7. File : indexeConf/sphinx.conf " $VERT $sphinxconf $NORMAL
|
||||
echo -e "8. File : /init.d/sphinxsearch " $VERT $sphinxinit $NORMAL
|
||||
if [ ! -z $2 ]; then
|
||||
if [ $2 == "2.0.1" ] || [ $2 = "0.9.9" ] || [ $2 = "0.9.5" ]; then
|
||||
echo -e "9. Archive : sphinx-$2-beta.tar.gz "$VERT"100%"$NORMAL
|
||||
else
|
||||
echo -e "9. Archive : Version : $2 not exist " $ROUGE "Failed" $NORMAL
|
||||
fi
|
||||
fi
|
||||
echo -e "10. Archive : libstemmer_c.tgz " $VERT $libstemmer $NORMAL
|
||||
echo -e "11. Compilation : tmp/sphinx-$version/src/libstemmer_c "$VERT"Compiled" $NORMAL
|
||||
echo -e "12. Compilation : tmp/sphinx-$version/src/ "$VERT"Complited" $NORMAL
|
||||
|
||||
echo -e $VERT"Directory and Files as beens creates\n" $NORMAL
|
||||
echo -n "Machine MASTER ? (y/n) : "; read response
|
||||
if [ $response = 'y' ];then
|
||||
MASTER=1
|
||||
`touch /usr/local/sphinx/sphinx.conf`;
|
||||
`cat config/${HOSTNAME}/sphinx.conf > /usr/local/sphinx/sphinx.conf`;
|
||||
if [ $response = 'y' ];then
|
||||
echo -e $ROUGE"Mode MASTER activated"$NORMAL
|
||||
`cat config/${HOSTNAME}/*.conf-MysqlServer >> /usr/local/sphinx/sphinx.conf`;
|
||||
else
|
||||
MASTER=0
|
||||
echo -e $ROUGE"Mode SLAVE activated"$NORMAL
|
||||
`cat config/${HOSTNAME}/*.conf-MysqlServerSlave >> /usr/local/sphinx/sphinx.conf`;
|
||||
fi
|
||||
|
||||
liste=`ls config/${HOSTNAME}`
|
||||
IFS='.'
|
||||
`cd config/${HOSTNAME}`
|
||||
|
||||
string=one:two::four
|
||||
oldIFS=$IFS
|
||||
IFS=:
|
||||
a=( $string )
|
||||
IFS=$oldIFS
|
||||
print ${a}
|
||||
exit
|
||||
`cat files/config.sphinx >> indexeConf/sphinx.conf`
|
||||
`cp indexeConf/sphinx.conf .`
|
||||
|
||||
`cp sphinx.conf /usr/local/sphinx/etc/`;
|
||||
echo -e $VERT"The installation as been finish ! great ! thank's damien :)"$NORMAL
|
||||
exit
|
||||
;;
|
||||
'--add')
|
||||
#Add a index
|
||||
if [ ! -e indexeConf/$2.sphinx.conf ]
|
||||
then
|
||||
echo -e $CYAN"Adding index progress..."$NORMAL
|
||||
`cp files/generic.sphinx.conf indexeConf/$2.sphinx.conf`
|
||||
`sed -e "s/xindex/$2/g" -i indexeConf/$2.sphinx.conf`
|
||||
createIndexeFile $2 "true"
|
||||
echo -e " - Check if this index exist"
|
||||
echo -e " - Create file in indexeConf/$2.sphinx.conf"
|
||||
echo -e " - Adding index in sphinx.conf"
|
||||
echo -e $VERT"Index $2 as been create"$NORMAL
|
||||
`rm tmp`
|
||||
`cp indexeConf/sphinx.conf .`
|
||||
exit
|
||||
else
|
||||
echo -e $ROUGE"[Erreur]: This index already exist !"$NORMAL
|
||||
exit
|
||||
fi
|
||||
`cp sphinx.conf /usr/local/sphinx/etc/`;
|
||||
echo -e $VERT"Configuration started" $NORMAL
|
||||
;;
|
||||
'--remove')
|
||||
#Run all action.
|
||||
if [ -e indexeConf/$2.sphinx.conf ]
|
||||
then
|
||||
echo -e $CYAN"Remove progress..."$NORMAL
|
||||
`rm indexeConf/$2.sphinx.conf`
|
||||
`cat indexeConf/* > indexeConf/sphinx.conf`
|
||||
`cat files/config.sphinx >> indexeConf/sphinx.conf`
|
||||
echo -e " - Delete file indexeConf/$2.sphinx.conf"
|
||||
echo -e " - Delete data in sphinx.conf"
|
||||
echo -e $VERT"Index $2 as been delete"$NORMAL
|
||||
`rm tmp > /dev/null`
|
||||
`cp indexeConf/sphinx.conf .`
|
||||
exit
|
||||
else
|
||||
echo -e $ROUGE"[Erreur]: This index: $2 not exist ! impossible to remove !"$NORMAL
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
'--updateQuery')
|
||||
if [ ! -z $2 ]
|
||||
then
|
||||
echo -e $CYAN"Update Query progress..."$NORMAL
|
||||
query=`cat $3`
|
||||
`sed -e "s/#xqueryx/$query/g" -i indexeConf/$2.sphinx.conf`
|
||||
`cat indexeConf/sphinx.conf > tmp`
|
||||
`cat indexeConf/$2.sphinx.conf > indexeConf/sphinx.conf`
|
||||
`cat tmp >> indexeConf/sphinx.conf`
|
||||
echo -e " - Query as been update in index $2"
|
||||
echo -e " - Refreshing sphinx.conf"
|
||||
echo -e $VERT"Operion successfull"$NORMAL
|
||||
`rm tmp > /dev/null`
|
||||
`cp indexeConf/sphinx.conf .`
|
||||
exit;
|
||||
fi
|
||||
`cp sphinx.conf /usr/local/sphinx/etc/`;
|
||||
echo -e $VERT"The installation as been finish ! great ! thank's damien :)"$NORMAL
|
||||
exit
|
||||
;;
|
||||
'--refresh')
|
||||
if [ -d indexeConf ]
|
||||
then
|
||||
`rm indexeConf/*~ 2> /dev/null`
|
||||
echo -e $CYAN"Refreshing progress..."$NORMAL
|
||||
directory=`ls indexeConf`
|
||||
for index in ${directory[*]}
|
||||
do
|
||||
echo " - Refreshing : "$index
|
||||
done
|
||||
`cat indexeConf/*.sphinx.conf > sphinx.conf`
|
||||
`cat files/config.sphinx >> sphinx.conf`
|
||||
echo -e $VERT"Refreshing as been finish"$NORMAL
|
||||
exit
|
||||
echo -n "Machine MASTER ? (y/n) : "; read response
|
||||
`touch /usr/local/sphinx/sphinx.conf`;
|
||||
`cat config/${HOSTNAME}/sphinx.conf > /usr/local/sphinx/sphinx.conf`;
|
||||
if [ $response = 'y' ];then
|
||||
echo -e $ROUGE"Mode MASTER activated"$NORMAL
|
||||
`cat config/${HOSTNAME}/*.conf-MysqlServer >> /usr/local/sphinx/sphinx.conf`;
|
||||
else
|
||||
echo -e $ROUGE"[Erreur]: nothing has refresh !"$NORMAL
|
||||
exit
|
||||
echo -e $ROUGE"Mode SLAVE activated"$NORMAL
|
||||
`cat config/${HOSTNAME}/*.conf-MysqlServerSlave >> /usr/local/sphinx/sphinx.conf`;
|
||||
fi
|
||||
`cp sphinx.conf /usr/local/sphinx/etc/`;
|
||||
echo -e $VERT"The refresh as been finish ! great ! thank's damien :)"$NORMAL
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
#Default
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
source source_act
|
||||
{
|
||||
type = mysql
|
||||
@ -7,12 +6,16 @@ source source_act
|
||||
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_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
|
||||
@ -25,16 +28,4 @@ index act
|
||||
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
|
||||
}
|
||||
|
||||
index act_phx
|
||||
{
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_act
|
||||
{
|
||||
type = mysql
|
||||
@ -7,12 +6,16 @@ source source_act
|
||||
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_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
|
||||
@ -25,16 +28,4 @@ index act
|
||||
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
|
||||
}
|
||||
|
||||
index act_phx
|
||||
{
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_dir
|
||||
{
|
||||
type = mysql
|
||||
@ -7,30 +6,29 @@ source source_dir
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre =
|
||||
# sql_query = SELECT id, siren, actif, \
|
||||
#IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
#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, adr_dep \
|
||||
#FROM rncs_dirigeants;
|
||||
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 = genre
|
||||
sql_attr_uint = adr_dep
|
||||
sql_query = SELECT id, siren, actif, \
|
||||
IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
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, adr_dep \
|
||||
FROM rncs_dirigeants;
|
||||
# UNION \
|
||||
#SELECT id, siren, 0 AS actif, \
|
||||
#'' AS genre, \
|
||||
#CONCAT(nom,' ',nomUsage,' ',rs) AS nom, prenom, \
|
||||
#0 AS naiss_annee, \
|
||||
#0 AS naiss_mois, \
|
||||
#0 AS naiss_jour, \
|
||||
#'' AS naissance_lieu, 0 AS adr_dep \
|
||||
#FROM bodacc_dirigeants_histo;
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = genre
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
@ -44,16 +42,4 @@ index dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_dir
|
||||
{
|
||||
type = mysql
|
||||
@ -7,30 +6,29 @@ source source_dir
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre =
|
||||
# sql_query = SELECT id, siren, actif, \
|
||||
#IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
#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, adr_dep \
|
||||
#FROM rncs_dirigeants;
|
||||
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 = genre
|
||||
sql_attr_uint = adr_dep
|
||||
sql_query = SELECT id, siren, actif, \
|
||||
IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
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, adr_dep \
|
||||
FROM rncs_dirigeants;
|
||||
# UNION \
|
||||
#SELECT id, siren, 0 AS actif, \
|
||||
#'' AS genre, \
|
||||
#CONCAT(nom,' ',nomUsage,' ',rs) AS nom, prenom, \
|
||||
#0 AS naiss_annee, \
|
||||
#0 AS naiss_mois, \
|
||||
#0 AS naiss_jour, \
|
||||
#'' AS naissance_lieu, 0 AS adr_dep \
|
||||
#FROM bodacc_dirigeants_histo;
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = genre
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
@ -44,16 +42,4 @@ index dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_ent
|
||||
{
|
||||
type = mysql
|
||||
@ -42,31 +41,4 @@ index ent
|
||||
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
|
||||
}
|
||||
|
||||
index ent_mns
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_mns
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
non_significatifs = /usr/local/sphinx/etc/mots-non-significatifs.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_ent
|
||||
{
|
||||
type = mysql
|
||||
@ -15,7 +14,7 @@ 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;
|
||||
FROM etablissements;
|
||||
sql_attr_str2ordinal = adr_typeVoie
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
@ -42,31 +41,4 @@ index ent
|
||||
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
|
||||
}
|
||||
|
||||
index ent_mns
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_mns
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
non_significatifs = /usr/local/sphinx/etc/mots-non-significatifs.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
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
|
||||
}
|
39
config/Sphinx/histo.conf-MysqlServer
Normal file
39
config/Sphinx/histo.conf-MysqlServer
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Sphinx configuration file sample
|
||||
#
|
||||
# WARNING! While this sample file mentions all available options,
|
||||
# it contains (very) short helper descriptions only. Please refer to
|
||||
# doc/sphinx.html for details.
|
||||
#
|
||||
|
||||
#############################################################################
|
||||
## data source definition
|
||||
#############################################################################
|
||||
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.78.230
|
||||
sql_user = sphinx_histo
|
||||
sql_pass = sphinx
|
||||
sql_db = histobodacc
|
||||
sql_port = 3306 # optional, default is 3306
|
||||
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
||||
sql_attr_uint = annee1
|
||||
sql_query_info = SELECT * FROM bodacc_ocr WHERE id=$id
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
## index definition
|
||||
#############################################################################
|
||||
|
||||
index histo
|
||||
{
|
||||
source = histo
|
||||
path = /home/sphinx/histo
|
||||
docinfo = extern
|
||||
morphology = none
|
||||
min_word_len = 1
|
||||
charset_type = sbcs
|
||||
html_strip = 1
|
||||
}
|
39
config/SphinxHisto/histo.conf-MysqlServer
Normal file
39
config/SphinxHisto/histo.conf-MysqlServer
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Sphinx configuration file sample
|
||||
#
|
||||
# WARNING! While this sample file mentions all available options,
|
||||
# it contains (very) short helper descriptions only. Please refer to
|
||||
# doc/sphinx.html for details.
|
||||
#
|
||||
|
||||
#############################################################################
|
||||
## data source definition
|
||||
#############################################################################
|
||||
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.78.230
|
||||
sql_user = sphinx_histo
|
||||
sql_pass = sphinx
|
||||
sql_db = histobodacc
|
||||
sql_port = 3306 # optional, default is 3306
|
||||
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
||||
sql_attr_uint = annee1
|
||||
sql_query_info = SELECT * FROM bodacc_ocr WHERE id=$id
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
## index definition
|
||||
#############################################################################
|
||||
|
||||
index histo
|
||||
{
|
||||
source = histo
|
||||
path = /home/sphinx/histo
|
||||
docinfo = extern
|
||||
morphology = none
|
||||
min_word_len = 1
|
||||
charset_type = sbcs
|
||||
html_strip = 1
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
|
||||
source source_act
|
||||
{
|
||||
type = mysql
|
||||
@ -7,12 +6,16 @@ source source_act
|
||||
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_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
|
||||
@ -25,16 +28,4 @@ index act
|
||||
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
|
||||
}
|
||||
|
||||
index act_phx
|
||||
{
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_act
|
||||
{
|
||||
type = mysql
|
||||
@ -7,12 +6,16 @@ source source_act
|
||||
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_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
|
||||
@ -25,16 +28,4 @@ index act
|
||||
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
|
||||
}
|
||||
|
||||
index act_phx
|
||||
{
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_dir
|
||||
{
|
||||
type = mysql
|
||||
@ -7,30 +6,29 @@ source source_dir
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre =
|
||||
# sql_query = SELECT id, siren, actif, \
|
||||
#IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
#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, adr_dep \
|
||||
#FROM rncs_dirigeants;
|
||||
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 = genre
|
||||
sql_attr_uint = adr_dep
|
||||
sql_query = SELECT id, siren, actif, \
|
||||
IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
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, adr_dep \
|
||||
FROM rncs_dirigeants;
|
||||
# UNION \
|
||||
#SELECT id, siren, 0 AS actif, \
|
||||
#'' AS genre, \
|
||||
#CONCAT(nom,' ',nomUsage,' ',rs) AS nom, prenom, \
|
||||
#0 AS naiss_annee, \
|
||||
#0 AS naiss_mois, \
|
||||
#0 AS naiss_jour, \
|
||||
#'' AS naissance_lieu, 0 AS adr_dep \
|
||||
#FROM bodacc_dirigeants_histo;
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = genre
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
@ -44,16 +42,4 @@ index dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_dir
|
||||
{
|
||||
type = mysql
|
||||
@ -7,30 +6,29 @@ source source_dir
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre =
|
||||
# sql_query = SELECT id, siren, actif, \
|
||||
#IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
#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, adr_dep \
|
||||
#FROM rncs_dirigeants;
|
||||
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 = genre
|
||||
sql_attr_uint = adr_dep
|
||||
sql_query = SELECT id, siren, actif, \
|
||||
IF(civilite='M',1,IF(civilite='MME' OR civilite='MLLE',2,0)) AS genre, \
|
||||
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, adr_dep \
|
||||
FROM rncs_dirigeants;
|
||||
# UNION \
|
||||
#SELECT id, siren, 0 AS actif, \
|
||||
#'' AS genre, \
|
||||
#CONCAT(nom,' ',nomUsage,' ',rs) AS nom, prenom, \
|
||||
#0 AS naiss_annee, \
|
||||
#0 AS naiss_mois, \
|
||||
#0 AS naiss_jour, \
|
||||
#'' AS naissance_lieu, 0 AS adr_dep \
|
||||
#FROM bodacc_dirigeants_histo;
|
||||
sql_attr_uint = naiss_annee
|
||||
sql_attr_uint = naiss_mois
|
||||
sql_attr_uint = naiss_jour
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = genre
|
||||
sql_attr_uint = adr_dep
|
||||
}
|
||||
|
||||
index dir
|
||||
@ -44,16 +42,4 @@ index dir
|
||||
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
|
||||
}
|
||||
|
||||
index dir_phx
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_ent
|
||||
{
|
||||
type = mysql
|
||||
@ -42,31 +41,4 @@ index ent
|
||||
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
|
||||
}
|
||||
|
||||
index ent_mns
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_mns
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
non_significatifs = /usr/local/sphinx/etc/mots-non-significatifs.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
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,4 +1,3 @@
|
||||
|
||||
source source_ent
|
||||
{
|
||||
type = mysql
|
||||
@ -15,7 +14,7 @@ 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;
|
||||
FROM etablissements;
|
||||
sql_attr_str2ordinal = adr_typeVoie
|
||||
sql_attr_uint = siren
|
||||
sql_attr_uint = nic
|
||||
@ -42,31 +41,4 @@ index ent
|
||||
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
|
||||
}
|
||||
|
||||
index ent_mns
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_mns
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
non_significatifs = /usr/local/sphinx/etc/mots-non-significatifs.txt
|
||||
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
|
||||
}
|
||||
|
||||
index ent_phx
|
||||
{
|
||||
source = source_ent
|
||||
path = /dbs/sphinx/ent_phx
|
||||
docinfo = extern
|
||||
morphology = libstemmer_francais
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
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
|
||||
}
|
39
config/sdsrvws02/histo.conf-MysqlServer
Normal file
39
config/sdsrvws02/histo.conf-MysqlServer
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Sphinx configuration file sample
|
||||
#
|
||||
# WARNING! While this sample file mentions all available options,
|
||||
# it contains (very) short helper descriptions only. Please refer to
|
||||
# doc/sphinx.html for details.
|
||||
#
|
||||
|
||||
#############################################################################
|
||||
## data source definition
|
||||
#############################################################################
|
||||
|
||||
source histo
|
||||
{
|
||||
type = mysql
|
||||
sql_host = 192.168.78.230
|
||||
sql_user = sphinx_histo
|
||||
sql_pass = sphinx
|
||||
sql_db = histobodacc
|
||||
sql_port = 3306 # optional, default is 3306
|
||||
sql_query = SELECT id, nomFichier, annee1, dateBod, texte FROM bodacc_ocr;
|
||||
sql_attr_uint = annee1
|
||||
sql_query_info = SELECT * FROM bodacc_ocr WHERE id=$id
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
## index definition
|
||||
#############################################################################
|
||||
|
||||
index histo
|
||||
{
|
||||
source = histo
|
||||
path = /home/sphinx/histo
|
||||
docinfo = extern
|
||||
morphology = none
|
||||
min_word_len = 1
|
||||
charset_type = sbcs
|
||||
html_strip = 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user