Home > Backend Development > PHP Tutorial > A problem with superhidden.exe sphinx incremental index

A problem with superhidden.exe sphinx incremental index

WBOY
Release: 2016-07-29 08:45:37
Original
1160 people have browsed it

But recently I found that incremental ones cannot always be searched. I looked at the operation 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
In order to improve the incremental indexing speed, I stored the incremental index in /dev/shm and looked at the contents of the /dev/shm/sphinx/data/ directory:
-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 article_delta.spd and other files, not .new document.
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, it is required Rename the original article_delta.spa to article_delta.old.spa, then rename article_delta.new.spa to article_delta.spa, and then notify searchd to restart to complete the rotate.
I remembered that I restarted the machine in the early hours of the morning a few days ago, and the original files were lost, making it impossible to rotate:(
Solution:
Run: bin/indexer article_delta
Created article_delta.spd, sph and other files.
Run: bin again /indexer article_delta --rotate
Run log prompt: rotating index 'article_delta': success
It's normal!
Write a script for the incremental indexing command and put it in rc.local, so that it will not work after restarting the machine This problem occurs again.

Copy the 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")

The above introduces a problem of superhidden.exe sphinx incremental index, including the content of superhidden.exe. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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