Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Настройки индексации:
- source tstSrc
- {
- type = mysql
- sql_host = 127.0.0.1
- sql_user = ****
- sql_pass = ****
- sql_db = dbt
- 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, text \
- FROM products
- sql_ranged_throttle = 0
- sql_query_info = SELECT * FROM products WHERE id=$id
- }
- index products
- {
- type = plain
- source = tstSrc
- path = /opt/sphinx/tst
- docinfo = extern
- mlock = 1
- morphology = stem_enru
- min_stemming_len = 2
- min_word_len = 1
- charset_type = utf-8
- html_strip = 1
- preopen = 1
- ondisk_dict = 0
- inplace_enable = 1
- }
- Содержимое таблицы:
- mysql> select * from products;
- +----+-----------------------------------------+
- | id | text |
- +----+-----------------------------------------+
- | 1 | InterTech2011400WBeigeblue |
- | 2 | GressoC3035350WBlacksilver |
- | 3 | ПатчкордNoname15мUTP15м5еcat |
- | 4 | michelinxMaxiTrailer129127j |
- +----+-----------------------------------------+
- 4 rows in set (0.00 sec)
- Результаты поиска:
- $ search -i products -e "@text \"^ПатчкордNoname15мUTP15м5еcat$\""
- Sphinx 1.11-dev (r2763)
- Copyright (c) 2001-2011, Andrew Aksyonoff
- Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)
- using config file '/usr/local/etc/sphinx.conf'...
- index 'products': query '@text "^ПатчкордNoname15мUTP15м5еcat$" ': returned 1 matches of 1 total in 0.000 sec
- displaying matches:
- 1. document=3, weight=1695
- id=3
- text=????????Noname15?UTP15?5?cat
- words:
- 1. 'патчкордnoname15мutp15м5еcat': 1 documents, 1 hits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement