#!/bin/sh
source te {
type = mysql
sql_host = host
sql_user = root
sql_pass =
sql_db = db
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query_pre = SET group_concat_max_len = 16384
sql_query_post = SET CHARACTER SET utf8
sql_query_pre = SET @id := 0
}
source search:te {
sql_query = \
SELECT \
@id := @id + 1, \
a.id AS a_id, \
a.name AS name, \
a.alternate_name AS alternate_name, \
a.description_en AS description_en, \
a.description_it AS description_it, \
a.description_es AS description_es, \
a.description_fr AS description_fr, \
a.description_de AS description_de, \
a.description_pt AS description_pt, \
a.description_pl AS description_pl, \
a.description_nl AS description_nl, \
a.description_fi AS description_fi, \
a.description_ua AS description_ua, \
a.description_ru AS description_ru, \
a.description_sv AS description_sv, \
a.description_no AS description_no, \
a.description_da AS description_da, \
c.id AS c_id, \
c.name AS c_name, \
c.accessible AS c_accessible, \
c.url AS c_url, \
c.alternate_name AS c_alternate_name, \
c.author, \
c.status AS c_status, \
lh.ru AS lh_description_ru, \
lh.en AS lh_description_en, \
lh.it AS lh_description_it, \
lh.es AS lh_description_es, \
lh.fr AS lh_description_fr, \
lh.de AS lh_description_de, \
lh.pl AS lh_description_pl, \
lh.nl AS lh_description_nl, \
lh.fi AS lh_description_fi, \
lh.fi AS lh_description_sv, \
lh.fi AS lh_description_da, \
f.name AS f_name, \
f.type AS f_type, \
f.name_inv AS f_name_inv, \
f.accessible AS f_accessible, \
f.alternate_name AS f_alternate_name, \
f.url AS f_url, \
lc.alias AS lc_alias, \
lc.code AS lc_code, \
fp.html_ru AS fp_description_ru, \
fp.html_en AS fp_description_en, \
fp.html_it AS fp_description_it, \
fp.html_es AS fp_description_es, \
fp.html_fr AS fp_description_fr, \
fp.html_de AS fp_description_de, \
fp.html_pl AS fp_description_pl, \
fp.html_nl AS fp_description_nl, \
fp.html_fi AS fp_description_fi, \
fp.html_fi AS fp_description_sv, \
fp.html_fi AS fp_description_da \
FROM article a \
LEFT JOIN collection c ON c.id = a.collection \
LEFT JOIN locale_html lh ON lh.collection_body_id = c.id \
LEFT JOIN factory f ON c.factory = f.id \
LEFT JOIN list_country lc ON lc.id = f.country \
LEFT JOIN filters fl ON fl.brand = f.id \
LEFT JOIN filter_pages fp ON fl.page_id = fp.id \
WHERE f.status IN (1,3) AND c.status IN (1,3)
sql_attr_uint = a_id
sql_attr_uint = c_id
sql_attr_uint = c_accessible
sql_attr_uint = f_accessible
sql_attr_uint = f_type
sql_attr_uint = c_status
sql_field_string = name
sql_field_string = alternate_name
sql_field_string = c_name
sql_field_string = c_alternate_name
sql_field_string = c_url
sql_field_string = author
sql_field_string = f_url
sql_field_string = f_name
sql_field_string = f_name_inv
sql_field_string = f_alternate_name
sql_field_string = lc_code
sql_field_string = lc_alias
sql_field_string = description_en
sql_field_string = description_it
sql_field_string = description_es
sql_field_string = description_fr
sql_field_string = description_de
sql_field_string = description_pt
sql_field_string = description_pl
sql_field_string = description_nl
sql_field_string = description_fi
sql_field_string = description_ua
sql_field_string = description_ru
sql_field_string = description_sv
sql_field_string = description_no
sql_field_string = description_da
sql_field_string = lh_description_ru
sql_field_string = lh_description_en
sql_field_string = lh_description_it
sql_field_string = lh_description_es
sql_field_string = lh_description_fr
sql_field_string = lh_description_de
sql_field_string = lh_description_pl
sql_field_string = lh_description_nl
sql_field_string = lh_description_fi
sql_field_string = lh_description_sv
sql_field_string = lh_description_da
sql_field_string = fp_description_ru
sql_field_string = fp_description_en
sql_field_string = fp_description_it
sql_field_string = fp_description_es
sql_field_string = fp_description_fr
sql_field_string = fp_description_de
sql_field_string = fp_description_pl
sql_field_string = fp_description_nl
sql_field_string = fp_description_fi
sql_field_string = fp_description_sv
sql_field_string = fp_description_da
}
index search {
source = search
path = /var/lib/manticore/search
docinfo = extern
html_strip = 1
morphology = stem_enru
charset_table = 0..9, A..Z->a..z,U+2019, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+451, U+451, U+27->U+2019,U+00C0->a,U+00C1->a,U+00C2->a,U+00C3->a,\
U+00C4->a,U+00C5->a,U+00C6->a,U+00E0->a,U+00E1->a,U+00E2->a,U+00E3->a,U+00E4->a,U+00E5->a,U+00E6->a,U+0104->a,U+0105->a,U+00C7->c,U+00E7->c,U+0106->c,U+0107->c,U+0108->c,\
U+0109->c,U+010A- >c,U+010B->c,U+010C->c,U+010D->c,U+00C8->e,U+00C9->e,U+00CA->e,U+00CB->e,U+00E8->e,U+00E9->e,U+00EA->e,U+00EB->e,U+00CC->i,U+00CD->i,U+00CE->i,U+00CF->i,U+00EC->i,\
U+00ED->i,U+00EE->i,U+00EF->i,U+00D1->n,U+00F1->n,U+00D2->o,U+00D3->o,U+00D4->o,U+00D5->o,U+00D6->o,U+00F2->o,U+00F3->o,U+00F4->o,U+00F5->o,U+00F6->o,U+015E->s,U+015F->s,U+00D9->u,\
U+00DA->u,U+00DB->u,U+00DC->u,U+00F9->u,U+00FA->u,U+00FB->u,U+00FC->u,U+00DD->y
blend_chars = U+0023, U+002B
ignore_chars = U+0040, U+002F, U+002A, U+002E, U+0028, U+0029, U+0026, U+0025, U+0024, U+002C, U+0021, U+005E
dict = keywords
index_exact_words = 1
expand_keywords = 1
min_word_len = 2
min_infix_len = 2
}
searchd {
listen = 127.0.0.1:9312
listen = 0.0.0.0:9306:mysql
listen = 0.0.0.0:9308:http
log = /var/log/manticore/searchd.log
query_log = /var/log/manticore/query.log
pid_file = /var/run/manticore/searchd.pid
data_dir = /var/lib/manticore
}