143 lines
6.4 KiB
Plaintext
143 lines
6.4 KiB
Plaintext
#####
|
|
# Pitsbikes
|
|
###########################
|
|
|
|
source pitbike
|
|
{
|
|
type = mysql
|
|
sql_host = ${DB_HOST}
|
|
sql_user = ${DB_USERNAME}
|
|
sql_pass = ${DB_PASSWORD}
|
|
sql_db = ${DB_DATABASE}
|
|
sql_port = 3306 # optional, default is 3306
|
|
sql_query_pre = SET NAMES utf8
|
|
sql_query_pre = SET SESSION query_cache_type=OFF
|
|
|
|
sql_query = SELECT `shop_item`.id, create_time, `shop_item`.`title` , description, page_keywords, mini_desc, page_title, page_h1, rating, price, ( SELECT group_concat( `shop_item_chars_vals`.`val` SEPARATOR ', ' ) FROM `shop_item_chars` LEFT JOIN `shop_item_chars_vals` ON (`shop_item_chars_vals`.`id` = `shop_item_chars`.`attr_value` ) WHERE `shop_item_chars`.`item_id` = `shop_item`.`id` ) AS tags,( SELECT group_concat( concat_ws(', ', `title`,`page_keywords`,`page_title`,`page_h1`) SEPARATOR ', ' ) FROM `shop_catalog` WHERE `shop_catalog`.`template_id` = `shop_item`.`template_id` ) AS catalog, `sizes`, `not_in_face`,`new` FROM shop_item where !`_sys_deleted` AND !`_sys_unvisible`
|
|
|
|
sql_attr_bool = not_in_face
|
|
sql_attr_bool = new
|
|
sql_attr_uint = rating
|
|
sql_attr_uint = price
|
|
|
|
sql_attr_multi = uint tag_id from query; SELECT `item_id` AS `doc_id` , `attr_value` AS `filter_id` FROM `shop_item_chars`
|
|
sql_attr_multi = uint size_id from query; SELECT `shop_item`.`id` AS `doc_id` , `shop_size`.`id` AS `filter_id` FROM `shop_size` RIGHT JOIN `shop_item` ON ( find_in_set( `shop_size`.`id` , `shop_item`.`sizes` ) )
|
|
sql_attr_multi = uint size_all_id from query; SELECT `shop_item`.`id` AS `doc_id` , `shop_size`.`id` AS `filter_id` FROM `shop_size` RIGHT JOIN `shop_item` ON ( find_in_set( `shop_size`.`id` , `shop_item`.`sizes_all` ) )
|
|
sql_attr_multi = uint place_id from query; SELECT `item_id` AS `doc_id` , `place` AS `filter_id` FROM `shop_goods` WHERE `status` = 2 AND `order_id` = 0 GROUP BY `item_id`, `place`
|
|
sql_attr_multi = uint catalog_id from query; SELECT `item_id` AS `doc_id` , `catalog_id` AS `filter_id` FROM `shop_catalog_items`
|
|
|
|
}
|
|
|
|
source pitbike_adm
|
|
{
|
|
type = mysql
|
|
sql_host = ${DB_HOST}
|
|
sql_user = ${DB_USERNAME}
|
|
sql_pass = ${DB_PASSWORD}
|
|
sql_db = ${DB_DATABASE}
|
|
sql_port = 3306 # optional, default is 3306
|
|
sql_query_pre = SET NAMES utf8
|
|
sql_query_pre = SET SESSION query_cache_type=OFF
|
|
sql_query = SELECT `shop_item`.id,`shop_item`.`_sys_unvisible`, create_time, `shop_item`.`title`, `mainpic_preview` , description, page_keywords, mini_desc, page_title, page_h1, rating, price, ( SELECT group_concat( `shop_item_chars_vals`.`val` SEPARATOR ', ' ) FROM `shop_item_chars` LEFT JOIN `shop_item_chars_vals` ON (`shop_item_chars_vals`.`id` = `shop_item_chars`.`attr_value` ) WHERE `shop_item_chars`.`item_id` = `shop_item`.`id` ) AS tags,( SELECT group_concat( concat_ws(', ', `title`,`page_keywords`,`page_title`,`page_h1`) SEPARATOR ', ' ) FROM `shop_catalog` WHERE `shop_catalog`.`template_id` = `shop_item`.`template_id` ) AS catalog, `sizes`, `not_in_face`,`new` FROM shop_item where !`_sys_deleted`
|
|
|
|
sql_attr_bool = not_in_face
|
|
sql_attr_bool = new
|
|
sql_attr_bool = _sys_unvisible
|
|
sql_attr_uint = rating
|
|
sql_attr_uint = price
|
|
sql_attr_uint = mainpic_preview
|
|
|
|
sql_attr_multi = uint tag_id from query; SELECT `item_id` AS `doc_id` , `attr_value` AS `filter_id` FROM `shop_item_chars`
|
|
sql_attr_multi = uint size_id from query; SELECT `shop_item`.`id` AS `doc_id` , `shop_size`.`id` AS `filter_id` FROM `shop_size` RIGHT JOIN `shop_item` ON ( find_in_set( `shop_size`.`id` , `shop_item`.`sizes` ) )
|
|
sql_attr_multi = uint size_all_id from query; SELECT `shop_item`.`id` AS `doc_id` , `shop_size`.`id` AS `filter_id` FROM `shop_size` RIGHT JOIN `shop_item` ON ( find_in_set( `shop_size`.`id` , `shop_item`.`sizes_all` ) )
|
|
sql_attr_multi = uint place_id from query; SELECT `item_id` AS `doc_id` , `place` AS `filter_id` FROM `shop_goods` WHERE `status` = 2 AND `order_id` = 0 GROUP BY `item_id`, `place`
|
|
sql_attr_multi = uint catalog_id from query; SELECT `item_id` AS `doc_id` , `catalog_id` AS `filter_id` FROM `shop_catalog_items`
|
|
|
|
}
|
|
|
|
source pitbike_cats
|
|
{
|
|
type = mysql
|
|
sql_host = ${DB_HOST}
|
|
sql_user = ${DB_USERNAME}
|
|
sql_pass = ${DB_PASSWORD}
|
|
sql_db = ${DB_DATABASE}
|
|
sql_port = 3306 # optional, default is 3306
|
|
sql_query_pre = SET NAMES utf8
|
|
sql_query_pre = SET SESSION query_cache_type=OFF
|
|
sql_query = SELECT id, title, page_keywords, page_h1, page_title FROM `shop_catalog` WHERE `_sys_unvisible` = 0 AND `_sys_deleted` = 0
|
|
}
|
|
|
|
index pitbike
|
|
{
|
|
source = pitbike
|
|
path = /usr/share/manticore/pitbike
|
|
docinfo = extern
|
|
mlock = 0
|
|
morphology = stem_enru, soundex, metaphone
|
|
min_word_len = 2
|
|
min_infix_len = 3
|
|
index_exact_words = 1
|
|
html_strip = 1
|
|
}
|
|
|
|
index pitbike_adm
|
|
{
|
|
source = pitbike_adm
|
|
path = /usr/share/manticore/pitbike_adm
|
|
docinfo = extern
|
|
mlock = 0
|
|
morphology = stem_enru, soundex, metaphone
|
|
min_word_len = 2
|
|
min_infix_len = 3
|
|
index_exact_words = 1
|
|
html_strip = 1
|
|
}
|
|
|
|
index pitbike_cats
|
|
{
|
|
source = pitbike_cats
|
|
path = /usr/share/manticore/pitbike_cats
|
|
docinfo = extern
|
|
mlock = 0
|
|
morphology = stem_enru, soundex, metaphone
|
|
index_exact_words = 1
|
|
min_word_len = 2
|
|
min_infix_len = 3
|
|
html_strip = 1
|
|
}
|
|
|
|
|
|
#############################################################################
|
|
## indexer settings
|
|
#############################################################################
|
|
|
|
indexer
|
|
{
|
|
mem_limit = 64M
|
|
}
|
|
|
|
#############################################################################
|
|
## searchd settings
|
|
#############################################################################
|
|
|
|
searchd
|
|
{
|
|
#listen = 0.0.0.0:9312
|
|
#listen = 127.0.0.1:3307:mysql41
|
|
listen = 0.0.0.0:9312
|
|
listen = 0.0.0.0:9306:mysql
|
|
listen = 0.0.0.0:9308:http
|
|
|
|
pseudo_sharding = 0
|
|
log = /var/log/manticore/searchd.log
|
|
query_log = /var/log/manticore/query.log
|
|
read_timeout = 5
|
|
client_timeout = 300
|
|
max_children = 30
|
|
pid_file = /var/run/manticore/searchd.pid
|
|
seamless_rotate = 1
|
|
preopen_indexes = 1
|
|
unlink_old = 1
|
|
}
|