A problem with sphinx incremental index_PHP tutorial

WBOY
Release: 2016-07-21 15:27:50
Original
981 people have browsed it

But recently I found that the incremental ones are always not found. I looked at the running log today and got the following prompt:

[Sun Apr 17 19:30:01.876 2011] [ 3400] WARNING: rotating index 'news_delta' : cur to old rename failed: rename /dev/shm/sphinx/data/news_delta.spa to /dev/shm/sphinx/data/news_delta.old.spa failed: No such file or directory

[Sun Apr 17 19:30:01.881 2011] [ 3400] WARNING: rotating index 'article_delta': cur to old rename failed: rename /dev/shm/sphinx/data/article_delta.spa to /dev/shm/sphinx/data/article_delta .old.spa failed: No such file or directory

To improve the incremental index speed, I stored the incremental index in /dev/shm and looked at the /dev/shm/sphinx/data/ directory Contents under:
-rw-r--r-- 1 root root 385762 Apr 17 19:21 article_delta.new.spd
-rw-r--r-- 1 root root 3713 Apr 17 19: 21 article_delta.new.sph
-rw-r--r-- 1 root root 46260 Apr 17 19:21 article_delta.new.spi
-rw-r--r-- 1 root root 0 Apr 17 19:21 article_delta.new.spk
-rw-r--r-- 1 root root 0 Apr 17 19:21 article_delta.new.spm
-rw-r--r-- 1 root root 261402 Apr 17 19:21 article_delta.new.spp

Strange, there should be files such as article_delta.spd, not .new files.
The --rotate parameter is used for incremental indexing.

Copy the code The code is as follows:

bin/indexer --rotate news_delta
bin/indexer --rotate article_delta

When rotating, you need to rename the original article_delta.spa to article_delta.old.spa, and then rename article_delta.new.spa Name it article_delta.spa, and then notify searchd to restart to complete the rotate.

I remembered that I restarted the machine a few days ago and the original files were lost, making it impossible to rotate:(

Solution:
Run: bin/indexer article_delta
Create

and then run: bin/indexer article_delta --rotate
Run log prompt: rotating index 'article_delta': success
It's normal! >Write a script for the incremental indexing command and place it in rc.local, so that this problem will not occur again after restarting the machine


Copy code<.> The code is as follows: echo "start:" $(date +"%y-%m-%d %H:%M:%S")
cd / usr/local/coreseek/bin
./indexer news_delta
./indexer article_delta
echo "end:" $(date +"%y-%m-%d %H:%M:%S ")



http://www.bkjia.com/PHPjc/323698.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323698.htmlTechArticleBut recently I found that the incremental ones are always not found. I looked at the running log today and got the following prompt: [ Sun Apr 17 19:30:01.876 2011] [ 3400] WARNING: rotating index 'news_delta': cur to old...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!