In Windows, the version 3.2.14win32 is used. Problem: After the searchd service is started, the indexes that are added again are invalid and will only take effect after the searchd service is restarted. Primary index: mysql incremental Index: new operation process: 1. create primary index: {code...} 2. start the service...
In Windows 7 64-bit environment, version 3.2.14 win32 is used.
Problem: After the searchd service is started, the indexes that are added again are invalid and will only take effect after the searchd service is restarted.
Primary index: mysql
Incremental Index: new
Procedure:
1. create a primary index:
indexer -c csft.conf mysql
2. start the service:
serachd
3. search through php:
8 results can be found
4. data for adding related keywords to the database
5. add an incremental index
Indexer-c csft. conf new -- rotate
6. search through php
8 Results
7. try to merge the indexes:
indexer -c csft.conf mysql new -merge-dst-range deleted 0 0 --rotate
8. search through php
The result is still 8
9. re-create the primary index:
indexer -c csft.conf mysql --rotate
10. search through php
The result is still 8
11. disable the original searchd service and start the searchd service. then, the data inserted in the query result will be displayed.
(It is strange that if the original searchd service is not disabled, the searchd service will be started directly in the index window, but the search results will change, but there are only two or three items, I don't know why ?)
Configuration File:
# MySQL data source configuration. for details, see: http://www.coreseek.cn/products-install/mysql/# Please first convert var/test/documents. SQL import database, and configure the following MySQL User password database # source definition source mysql {type = mysql SQL _host = localhost SQL _user = root SQL _pass = root SQL _db = mall SQL _port = 3306 SQL _query_pre = SET NAMES utf8 # insert maximum id SQL _query_pre = REPLACE INTO acticle_new SELECT 1, MAX (id) FROM acticle SQL _query = SELECT id, title, content FROM acticle # SQL _query the id of the first column must be an integer # title, content as a string/text field, full-text index # SQL _attr_uint = group_id # The value read from SQL must be an integer # SQL _attr_timestamp = date_added # The value read from SQL must be an integer, as the time attribute SQL _query_info_pre = set names utf8 # When querying the command line, SET the correct character SET SQL _query_info = SELECT * FROM acticle WHERE id = $ id # When querying the command line, read original data from the database} # incremental data source new: mysql {SQL _query_pre = set names utf8 SQL _query = select id, title, content from acticle where id> (select newid from acticle_new where id = 1); SQL _query_post = replace into acticle_new SELECT 1, MAX (id) FROM acticle SQL _query_post_index = REPLACE INTO acticle_new SELECT 1, MAX (id) FROM acticle} # index primary index definition index mysql {source = mysql # corresponding source name path = E: /coreseek/var/data/mysql # change it to the actual absolute path, for example,/usr/local/coreseek/var /... docinfo = extern mlock = 0 morphology = none min_word_len = 1 // minimum index word length. it is invalid after setting. The reason is unknown. html_strip = 0 # Chinese word segmentation configuration. for details, see: http://www.coreseek.cn/products-install/coreseek_mmseg/ # Charset_dictpath =/usr/local/mmseg3/etc/# BSD, set in Linux,/charset_dictpath = E:/coreseek/etc/# set in Windows, /indicates the end of the symbol. it is best to give an absolute path, for example, C:/usr/local/coreseek/etc /... charset_type = zh_cn.utf-8} # incremental index new: mysql {type = rt source = new # corresponding source name path = E: /coreseek/var/data/new # change it to the actual absolute path, for example,/usr/local/coreseek/var /... docinfo = extern mlock = 0 morphology = none min_word_len = 1 // minimum index term length html_strip = 0 # Chinese word segmentation configuration. for details, see: http://www.coreseek.cn/products-install/coreseek_mmseg/ # Charset_dictpath =/usr/local/mmseg3/etc/# BSD, set in Linux,/charset_dictpath = E:/coreseek/etc/# set in Windows, /indicates the end of the symbol. it is best to give an absolute path, for example, C:/usr/local/coreseek/etc /... charset_type = zh_cn.utf-8} # global index definition indexer {mem_limit = 128 M} # searchd service definition searchd {listen = 9312 read_timeout = 5 max_children = 30 max_matches = 1000 bytes = 0 preopen_indexes = 0 unlink_old = 1 pid_file = E: /coreseek/var/log/searchd_mysql.pid # change it to the actual absolute path, for example:/usr/local/coreseek/var /... log = E:/coreseek/var/log/searchd_mysql.log # change it to the actual absolute path, for example,/usr/local/coreseek/var /... query_log = E:/coreseek/var/log/query_mysql.log # change it to the actual absolute path, for example:/usr/local/coreseek/var /...}
Reply content:
In Windows 7 64-bit environment, version 3.2.14 win32 is used.
Problem: After the searchd service is started, the indexes that are added again are invalid and will only take effect after the searchd service is restarted.
Primary index: mysql
Incremental Index: new
Procedure:
1. create a primary index:
indexer -c csft.conf mysql
2. start the service:
serachd
3. search through php:
8 results can be found
4. data for adding related keywords to the database
5. add an incremental index
Indexer-c csft. conf new -- rotate
6. search through php
8 Results
7. try to merge the indexes:
indexer -c csft.conf mysql new -merge-dst-range deleted 0 0 --rotate
8. search through php
The result is still 8
9. re-create the primary index:
indexer -c csft.conf mysql --rotate
10. search through php
The result is still 8
11. disable the original searchd service and start the searchd service. then, the data inserted in the query result will be displayed.
(It is strange that if the original searchd service is not disabled, the searchd service will be started directly in the index window, but the search results will change, but there are only two or three items, I don't know why ?)
Configuration File:
# MySQL data source configuration. for details, see: http://www.coreseek.cn/products-install/mysql/# Please first convert var/test/documents. SQL import database, and configure the following MySQL User password database # source definition source mysql {type = mysql SQL _host = localhost SQL _user = root SQL _pass = root SQL _db = mall SQL _port = 3306 SQL _query_pre = SET NAMES utf8 # insert maximum id SQL _query_pre = REPLACE INTO acticle_new SELECT 1, MAX (id) FROM acticle SQL _query = SELECT id, title, content FROM acticle # SQL _query the id of the first column must be an integer # title, content as a string/text field, full-text index # SQL _attr_uint = group_id # The value read from SQL must be an integer # SQL _attr_timestamp = date_added # The value read from SQL must be an integer, as the time attribute SQL _query_info_pre = set names utf8 # When querying the command line, SET the correct character SET SQL _query_info = SELECT * FROM acticle WHERE id = $ id # When querying the command line, read original data from the database} # incremental data source new: mysql {SQL _query_pre = set names utf8 SQL _query = select id, title, content from acticle where id> (select newid from acticle_new where id = 1); SQL _query_post = replace into acticle_new SELECT 1, MAX (id) FROM acticle SQL _query_post_index = REPLACE INTO acticle_new SELECT 1, MAX (id) FROM acticle} # index primary index definition index mysql {source = mysql # corresponding source name path = E: /coreseek/var/data/mysql # change it to the actual absolute path, for example,/usr/local/coreseek/var /... docinfo = extern mlock = 0 morphology = none min_word_len = 1 // minimum index word length. it is invalid after setting. The reason is unknown. html_strip = 0 # Chinese word segmentation configuration. for details, see: http://www.coreseek.cn/products-install/coreseek_mmseg/ # Charset_dictpath =/usr/local/mmseg3/etc/# BSD, set in Linux,/charset_dictpath = E:/coreseek/etc/# set in Windows, /indicates the end of the symbol. it is best to give an absolute path, for example, C:/usr/local/coreseek/etc /... charset_type = zh_cn.utf-8} # incremental index new: mysql {type = rt source = new # corresponding source name path = E: /coreseek/var/data/new # change it to the actual absolute path, for example,/usr/local/coreseek/var /... docinfo = extern mlock = 0 morphology = none min_word_len = 1 // minimum index term length html_strip = 0 # Chinese word segmentation configuration. for details, see: http://www.coreseek.cn/products-install/coreseek_mmseg/ # Charset_dictpath =/usr/local/mmseg3/etc/# BSD, set in Linux,/charset_dictpath = E:/coreseek/etc/# set in Windows, /indicates the end of the symbol. it is best to give an absolute path, for example, C:/usr/local/coreseek/etc /... charset_type = zh_cn.utf-8} # global index definition indexer {mem_limit = 128 M} # searchd service definition searchd {listen = 9312 read_timeout = 5 max_children = 30 max_matches = 1000 bytes = 0 preopen_indexes = 0 unlink_old = 1 pid_file = E: /coreseek/var/log/searchd_mysql.pid # change it to the actual absolute path, for example:/usr/local/coreseek/var /... log = E:/coreseek/var/log/searchd_mysql.log # change it to the actual absolute path, for example,/usr/local/coreseek/var /... query_log = E:/coreseek/var/log/query_mysql.log # change it to the actual absolute path, for example:/usr/local/coreseek/var /...}