Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 2111 → Rev 2112

/trunk/papyrus/applettes/moteur_recherche/sphinx-min.conf
15,12 → 15,11
sql_user = root
sql_pass =
sql_db = raphdb
sql_sock = /home/raphael/web/mysql/mysql.sock
sql_sock = /var/lib/mysql/mysql.sock
#sql_query_pre = SET NAMES utf8
sql_query_pre = SET NAMES latin1
}
 
 
index i_common
{
# source =
90,7 → 89,6
}
 
 
 
# PAPYRUS
source papyrus : common
{
181,10 → 179,6
sql_attr_string = main_id
}
 
 
 
 
# misc...
index i_bazar : i_common {
source = bazar
path = /var/lib/sphinx/bazar
193,6 → 187,36
infix_fields = titre, texte
}
 
 
 
# COSTE
source coste : common {
sql_query = \
SELECT c.num_nom AS id, CONCAT("bdtfx", ":", c.num_nom) AS group_id, CONCAT(c.nom_sci, dsc.body) AS texte, CONCAT(c.nom_sci, cle.body) AS determination, c.nom_sci AS nom_sci \
FROM tb_eflore.coste_v2_00 c \
LEFT JOIN tela_prod_wikini.florecoste_pages dsc ON c.page_wiki_dsc = dsc.tag AND dsc.latest = 'Y' \
LEFT JOIN tela_prod_wikini.florecoste_pages cle ON c.page_wiki_cle = dsc.tag AND dsc.latest = 'Y';
 
sql_field_string = group_id
}
 
index i_coste : i_common {
source = coste
path = /var/lib/sphinx/coste
 
infix_fields = texte, nom_sci
 
# override latin1, nécessaire pour les 4 indexes ci-dessus:
charset_type = utf-8
sql_query_pre = SET NAMES utf8
sql_query_pre = SET CHARACTER_SET_RESULTS=utf8
# valeur par défaut, cf http://sphinxsearch.com/docs/archives/1.10/conf-charset-table.html
# pour écraser i_common
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
}
 
 
# misc...
index testrt
{
type = rt
229,8 → 253,8
workers = threads # for RT to work
binlog_path = /var/lib/sphinx
 
#collation_server = utf8_general_ci # unsure
#collation_libc_locale = fr_FR.UTF-8
# collation_server = utf8_general_ci # unsure
# collation_libc_locale = fr_FR.UTF-8
 
# collation_libc_locale = fr_FR@euro
# collation_libc_locale = fr_FR@euro
239,5 → 263,11
 
 
 
# sudo sphinx-searchd --stop -c sphinx-min.conf; sleep 2; sudo sphinx-indexer -c sphinx-min.conf i_projet; sphinx-search -q -c sphinx-min.conf -i i_projet "@texte homogé*"
# sudo sphinx-searchd --stopwait -c sphinx-min.conf; sudo sphinx-indexer -c sphinx-min.conf i_projet; sphinx-search -q -c sphinx-min.conf -i i_projet "@texte homogé*"
# sudo sphinx-searchd -c sphinx-min.conf
 
 
# problème de charsets:
# + https://raw.github.com/melo/scripts/master/bin/x-sphinx-charset-generator
# $ wget https://raw.github.com/tom--/Collation-to-Charset-Table/master/collation_2_charset_table-{1,2}.php
# $ php collation_2_charset_table-1.php|sed -n -e '/^[A-Z]/p'|php collation_2_charset_table-2.php