This commit is contained in:
parent
10968bdfac
commit
9cecba87b2
36
Sphinx.sh
36
Sphinx.sh
@ -5,7 +5,6 @@ source function.sh
|
||||
allVersion=("2.0.1" "0.9.9")
|
||||
source='files/description.list'
|
||||
|
||||
`cat $source`
|
||||
echo ' ____ __ ____ __ '
|
||||
echo '/\ _`\ /\ \ __ /\ _`\ /\ \__ '
|
||||
echo '\ \,\L\_\ _____\ \ \___ /\_\ ___ __ _ \ \ \L\_\ __ ___ __ _ __ __ \ \ ,_\ ___ _ __ '
|
||||
@ -16,11 +15,19 @@ echo ' \/_____/\ \ \/ \/_/\/_/\/_/\/_/\/_/\//\/_/ \/___/ \/____/\/_/\/_
|
||||
echo ' \ \_\ '
|
||||
echo ' \/_/ '
|
||||
|
||||
#This program as been create by Damien for Scores et decisions ste
|
||||
#Email : dlasserre@scores-decisions.com
|
||||
|
||||
#if [ man page exist ! ]
|
||||
# download ans install man page !
|
||||
if [ `id -u` = 0 ] #Need Root or Sudo
|
||||
then
|
||||
commande=('--configure' '--install' '--all')
|
||||
for i; do
|
||||
case $i in
|
||||
'--help')
|
||||
`man SphinxHelp` #en cours de création du man !
|
||||
;;
|
||||
'--delete')
|
||||
`rm -r indexeConf source sphinx-* wget* libste* *~ 2> /dev/null`
|
||||
echo -e "- Clean directory"
|
||||
@ -89,7 +96,7 @@ then
|
||||
echo -e $CYAN"Compilation progress..."$ROUGE
|
||||
if [ $version != "2.0.1-beta" ];then `cd source/sphinx-$version ; make ` ;fi
|
||||
#Make and install binary.
|
||||
`cd source/sphinx-$version/ ; make install 1> /dev/null`
|
||||
#`cd source/sphinx-$version/ ; make install 1> /dev/null`
|
||||
echo -e $NORMAL" - Complited"
|
||||
echo ""
|
||||
echo -e $CYAN"Visualisation"$NORMAL
|
||||
@ -120,10 +127,29 @@ then
|
||||
read response
|
||||
for index in ${response[@]}
|
||||
do
|
||||
`cp files/generic.sphinx.conf indexeConf/$index.sphinx.conf`
|
||||
`sed -e "s/xindex/$index/g" -i indexeConf/$index.sphinx.conf`
|
||||
case $index in
|
||||
"ent")
|
||||
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
;;
|
||||
"act")
|
||||
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
;;
|
||||
"dir")
|
||||
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
;;
|
||||
"comptage")
|
||||
`cp files/SdIndexe/$index.conf indexeConf/$index.sphinx.conf`
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
;;
|
||||
*)
|
||||
`cp files/generic.sphinx.conf indexeConf/$index.sphinx.conf`
|
||||
`sed -e "s/xindex/$index/g" -i indexeConf/$index.sphinx.conf`
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
esac
|
||||
echo -e " - Written data in $index.sphinx.conf"
|
||||
`cat indexeConf/$index.sphinx.conf >> indexeConf/sphinx.conf`
|
||||
echo -e $VERT"File $index as been create"$NORMAL
|
||||
done
|
||||
`cat files/config.sphinx >> indexeConf/sphinx.conf`
|
||||
|
176
sphinx.conf
176
sphinx.conf
@ -1,14 +1,17 @@
|
||||
|
||||
|
||||
source source_act
|
||||
{
|
||||
type = mysql
|
||||
sql_host =
|
||||
sql_user =
|
||||
sql_pass =
|
||||
sql_db =
|
||||
sql_query_pre =
|
||||
sql_query = la query !
|
||||
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
|
||||
}
|
||||
|
||||
index act
|
||||
@ -16,23 +19,7 @@ index act
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
ispell_aff = /usr/local/sphinx/etc/francais.aff
|
||||
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 act_mns
|
||||
{
|
||||
source = source_act
|
||||
path = /dbs/sphinx/act_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
|
||||
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, \
|
||||
@ -45,74 +32,39 @@ index act_phx
|
||||
path = /dbs/sphinx/act_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
|
||||
}
|
||||
|
||||
source source_dir
|
||||
}source source_ent
|
||||
{
|
||||
type = mysql
|
||||
sql_host =
|
||||
sql_user =
|
||||
sql_pass =
|
||||
sql_db =
|
||||
sql_host = 192.168.3.30
|
||||
sql_user = sphinx
|
||||
sql_pass = indexer
|
||||
sql_db = jo
|
||||
sql_query_pre =
|
||||
sql_query =
|
||||
}
|
||||
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 dir
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
ispell_aff = /usr/local/sphinx/etc/francais.aff
|
||||
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 dir_mns
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_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 dir_phx
|
||||
{
|
||||
source = source_dir
|
||||
path = /dbs/sphinx/dir_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
|
||||
}
|
||||
|
||||
source source_ent
|
||||
{
|
||||
type = mysql
|
||||
sql_host =
|
||||
sql_user =
|
||||
sql_pass =
|
||||
sql_db =
|
||||
sql_query_pre =
|
||||
sql_query =
|
||||
}
|
||||
|
||||
index ent
|
||||
@ -155,6 +107,58 @@ index ent_phx
|
||||
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
|
||||
}
|
||||
|
||||
source source_ddd
|
||||
{
|
||||
type = mysql
|
||||
sql_host =
|
||||
sql_user =
|
||||
sql_pass =
|
||||
sql_db =
|
||||
sql_query_pre =
|
||||
sql_query =
|
||||
}
|
||||
|
||||
index ddd
|
||||
{
|
||||
source = source_ddd
|
||||
path = /dbs/sphinx/ddd
|
||||
docinfo = extern
|
||||
wordforms = /usr/local/sphinx/etc/wordforms.txt
|
||||
abreviations = /usr/local/sphinx/etc/abreviations.txt
|
||||
ispell_aff = /usr/local/sphinx/etc/francais.aff
|
||||
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 ddd_mns
|
||||
{
|
||||
source = source_ddd
|
||||
path = /dbs/sphinx/ddd_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 ddd_phx
|
||||
{
|
||||
source = source_ddd
|
||||
path = /dbs/sphinx/ddd_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
|
||||
}
|
||||
#############################################################################
|
||||
## indexer settings
|
||||
#############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user