Sphsf-increment index _ PHP Tutorial

Source: Internet
Author: User
An issue with the incremental index of sphinx. However, I recently found that the incremental data cannot be searched. I read the running log today and have the following prompt: [SunApr1719: 30: 01.8762011] [3400] WARNING: rotatingindexnews_delta: curtoold, but I recently found that the incremental data cannot be searched. I read the running log today and have 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/sphled/data/article_delta.old.spa failed: No such file or directory

To speed up the incremental index, I saved the incremental index in/dev/shm and read the content in the/dev/shm/sphinx/data/directory:
-Rw-r -- 1 root 385762 Apr 17 article_delta.new.spd
-Rw-r -- 1 root 3713 Apr 17 article_delta.new.7d
-Rw-r -- 1 root 46260 Apr 17 article_delta.new.spi
-Rw-r -- 1 root 0 Apr 17 19:21 article_delta.new.spk
-Rw-r -- 1 root 0 Apr 17 19:21 article_delta.new.spm
-Rw-r -- 1 root 261402 Apr 17 article_delta.new.spp

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

The code is as follows:


Bin/indexer -- rotate news_delta
Bin/indexer -- rotate article_delta


During rotate, you need to rename the original article_delta.spa to article_delta.old.spa, rename article_delta.new.spa to article_delta.spa, and then notify searchd to restart rotate.

I think that I restarted the machine a few days ago and lost all the original files. as a result, I cannot rotate :(

Solution:
Run: bin/indexer article_delta
You have created articles such as article_delta.spd and 7D.

Run: bin/indexer article_delta -- rotate
Run Log prompt: rotating index 'article _ Delta': success
Normal!

Write a script for the command to perform incremental index and place it in rc. local. this will not cause this problem after the machine is restarted.

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

WARNING [Sun Apr 17 19:30:01. 876 2011] [3400] WARNING: rotating index 'news _ Delta': cur to old...

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.