Coreseek Adding an incremental index cannot take effect, what's going on?

Source: Internet
Author: User

Windows7 in 64-bit environments, the 3.2.14 Win32 version is used.

Issue: When you start the SEARCHD service, the indexes you add are not valid, and only after you restart the SEARCHD service will it take effect.

Main index: MySQL
Incremental index: New

Operation Process:
1. Establish the primary index:

indexer -c csft.conf mysql

2. Start the service:

serachd

3. Search by PHP:
can find 8 results

4. New data in the database to add relevant keywords

5. Adding incremental indexes
Indexer-c csft.conf New--rotate

6. Search by PHP
The result is still 8.

7. Or try merging indexes:

indexer -c csft.conf mysql new -merge-dst-range deleted 0 0 --rotate

8. Search by PHP
The result is still 8.

9. Re-establish the primary index:

indexer -c csft.conf mysql --rotate

10. Search by PHP
The result is still 8.

11. Close the original SEARCHD service, and then start the Searchd service, the result of the query is the data you just inserted
(Oddly, if the original SEARCHD service is not turned off and the Searchd service is started directly in the window that is being indexed, the results of the search will change, but there are only two or three, and I wonder why?) )

Configuration file:

#MySQL数据源配置, for more information, see: http://www.coreseek.cn/products-install/mysql/#请先将var/test/ Documents.sql Import the database and configure the following MySQL user password database # source definition mysql{type = mysql Sql_host = Lo Calhost Sql_user = root Sql_pass = root sql_db = Mall Sql_por t = 3306 sql_query_pre = SET NAMES UTF8 #插入文章表的最大id sql_query_pre = REPLACE I                                                              NTO acticle_new Select 1, MAX (ID) from acticle sql_query = Select id, title,content from acticle                                                              #sql_query第一列id需为整数 #title, content as a string/text field, full-text indexed #sql_attr_uint = group_id #从SQL读取到的值必须为整数 #sq                                        L_attr_timestamp = date_added #从SQL读取到的值必须为整数, as time attribute sql_query_info_pre = SET NAMES UTF8 #命令行查询时, set the correct character set sql_query_info =SELECT * from acticle where id= $id #命令行查询时 to read raw data information from the database} #增量数据源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_ne            W SELECT 1, MAX (ID) from acticle} #index Primary index definition index mysql{Source = mysql #对应的source名称 path = E:/coreseek/var/data/mysql #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/... docinfo = extern mlo                CK = 0 Morphology = None Min_word_len = 1//minimum index word length, invalid after setting, unexplained Html_strip = 0 #中文分词配置, please see: http://www.coreseek.cn/products-install/coreseek_mmseg/#charset_dictpath =/usr/local/mmseg3/etc /#BSD, Linux settings,/symbol End charset_dictpath = e:/coreseek/etc/#Windows环境下设置,/end of symbol, it is best to give absolute path, for example : c:/usr/local/coreseek/etc/... charset_type = zh_cn.utf-8} #增量索引index new:mysql{Type=rt Source = new #对应的source名称 Pat h = e:/coreseek/var/data/new #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/... docinfo = extern ml Ock = 0 Morphology = None Min_word_len = 1//Minimum index word length html_strip = 0 #中 Text participle configuration, see: http://www.coreseek.cn/products-install/coreseek_mmseg/#charset_dictpath =/usr/local/mmseg3/etc/# BSD, Linux environment settings,/symbol End charset_dictpath = e:/coreseek/etc/#Windows环境下设置,/end of symbol, it is best to give absolute path, for example: C: /usr/local/coreseek/etc/charset_type = zh_cn.utf-8} #全局index定义indexer {mem_limit = 128M} #se ARCHD Service definition searchd{listen = 9312 Read_timeout = 5 Max_children = Max_matche  s = seamless_rotate = 0 preopen_indexes = 0 Unlink_old = 1 Pid_file = E:/coreseek/var/log/searchd_mySql.pid #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/. log = E:/coreseek/var/log/searchd_mysql.log #请修改为实际使用的绝对路 such as:/usr/local/coreseek/var/Query_log = E:/coreseek/var/log/query_mysql.log #请修改为实际使用的绝对路径, for example:/usr/local/ coreseek/var/...}

Reply content:

Windows7 in 64-bit environments, the 3.2.14 Win32 version is used.

Issue: When you start the SEARCHD service, the indexes you add are not valid, and only after you restart the SEARCHD service will it take effect.

Main index: MySQL
Incremental index: New

Operation Process:
1. Establish the primary index:

indexer -c csft.conf mysql

2. Start the service:

serachd

3. Search by PHP:
can find 8 results

4. New data in the database to add relevant keywords

5. Adding incremental indexes
Indexer-c csft.conf New--rotate

6. Search by PHP
The result is still 8.

7. Or try merging indexes:

indexer -c csft.conf mysql new -merge-dst-range deleted 0 0 --rotate

8. Search by PHP
The result is still 8.

9. Re-establish the primary index:

indexer -c csft.conf mysql --rotate

10. Search by PHP
The result is still 8.

11. Close the original SEARCHD service, and then start the Searchd service, the result of the query is the data you just inserted
(Oddly, if the original SEARCHD service is not turned off and the Searchd service is started directly in the window that is being indexed, the results of the search will change, but there are only two or three, and I wonder why?) )

Configuration file:

#MySQL数据源配置, for more information, see: http://www.coreseek.cn/products-install/mysql/#请先将var/test/ Documents.sql Import the database and configure the following MySQL user password database # source definition mysql{type = mysql Sql_host = Lo Calhost Sql_user = root Sql_pass = root sql_db = Mall Sql_por t = 3306 sql_query_pre = SET NAMES UTF8 #插入文章表的最大id sql_query_pre = REPLACE I                                                              NTO acticle_new Select 1, MAX (ID) from acticle sql_query = Select id, title,content from acticle                                                              #sql_query第一列id需为整数 #title, content as a string/text field, full-text indexed #sql_attr_uint = group_id #从SQL读取到的值必须为整数 #sq                                        L_attr_timestamp = date_added #从SQL读取到的值必须为整数, as time attribute sql_query_info_pre = SET NAMES UTF8 #命令行查询时, set the correct character set sql_query_info =SELECT * from acticle where id= $id #命令行查询时 to read raw data information from the database} #增量数据源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_ne            W SELECT 1, MAX (ID) from acticle} #index Primary index definition index mysql{Source = mysql #对应的source名称 path = E:/coreseek/var/data/mysql #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/... docinfo = extern mlo                CK = 0 Morphology = None Min_word_len = 1//minimum index word length, invalid after setting, unexplained Html_strip = 0 #中文分词配置, please see: http://www.coreseek.cn/products-install/coreseek_mmseg/#charset_dictpath =/usr/local/mmseg3/etc /#BSD, Linux settings,/symbol End charset_dictpath = e:/coreseek/etc/#Windows环境下设置,/end of symbol, it is best to give absolute path, for example : c:/usr/local/coreseek/etc/... charset_type = zh_cn.utf-8} #增量索引index new:mysql{Type=rt Source = new #对应的source名称 Pat h = e:/coreseek/var/data/new #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/... docinfo = extern ml Ock = 0 Morphology = None Min_word_len = 1//Minimum index word length html_strip = 0 #中 Text participle configuration, see: http://www.coreseek.cn/products-install/coreseek_mmseg/#charset_dictpath =/usr/local/mmseg3/etc/# BSD, Linux environment settings,/symbol End charset_dictpath = e:/coreseek/etc/#Windows环境下设置,/end of symbol, it is best to give absolute path, for example: C: /usr/local/coreseek/etc/charset_type = zh_cn.utf-8} #全局index定义indexer {mem_limit = 128M} #se ARCHD Service definition searchd{listen = 9312 Read_timeout = 5 Max_children = Max_matche  s = seamless_rotate = 0 preopen_indexes = 0 Unlink_old = 1 Pid_file = E:/coreseek/var/log/searchd_mySql.pid #请修改为实际使用的绝对路径, for example:/usr/local/coreseek/var/. log = E:/coreseek/var/log/searchd_mysql.log #请修改为实际使用的绝对路 such as:/usr/local/coreseek/var/Query_log = E:/coreseek/var/log/query_mysql.log #请修改为实际使用的绝对路径, for example:/usr/local/ coreseek/var/...}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.