Skip to content

Instantly share code, notes, and snippets.

@iZerus
Last active March 10, 2021 12:37
Show Gist options
  • Save iZerus/cae26072cb815677dec4c95b950cae9d to your computer and use it in GitHub Desktop.
Save iZerus/cae26072cb815677dec4c95b950cae9d to your computer and use it in GitHub Desktop.
Manticore & ProstorCMS
source mysite {
type = mysql
sql_host = localhost
sql_user = user
sql_pass = 123
sql_db = base
sql_query = SELECT p.id as id, p.name as name, p.url as url, pv.sku as sku from s_products as p INNER JOIN s_variants pv ON pv.product_id=p.id AND pv.price>0 AND pv.visible = 1 AND (pv.stock IS NULL OR pv.stock>0) WHERE p.visible = 1
}
index mysite {
type = plain
source = mysite
path = /var/lib/manticore/mysite
morphology = stem_enru
min_infix_len = 3
ignore_chars = -
min_word_len = 2
regexp_filter = (\d+)[x\x{0445}\*] => \1 x
regexp_filter = (\d*\.?\d+)(\D+) => \1 \2
regexp_filter = (\D+)(\d*\.?\d+) => \1 \2
stored_fields = name
stored_only_fields = url
wordforms = /var/www/html/ManticoreSearch/wordforms/mysite.wfs
}
searchd
{
# listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql
# listen = 127.0.0.1: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/ # для plain index указывается в самом индексе
query_log_format = sphinxql
binlog_path = #
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment