Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sphinx: Initialize Real Time Index

Tags:

sphinx

I would like to migrate one of the sphinx index into real time. However, rt index doesn't take a source and its initialization is kinda messy. Is there a way to migrate existing index into real time without a lot of scripting?

like image 661
Yau Leung Avatar asked Jan 22 '23 04:01

Yau Leung


2 Answers

I am glad that my presentation was helpful, but now Sphinx has new command which help migrate from original to real-time indexes: attach index

It is simple as:

ATTACH INDEX diskindex TO RTINDEX rtindex

BTW, I have wrote a blog post which describe attach index command in details.

like image 162
Iaroslav Vorozhko Avatar answered May 17 '23 11:05

Iaroslav Vorozhko


At the moment no official way exists. Only custom solutions. In this interesting document (PDF) there is one of the ways mentioned:

mysqldump -uroot blog users > users_dump.sql
mysql -P9306 < users_dump.sql

Regards.

like image 39
Maastermedia Avatar answered May 17 '23 12:05

Maastermedia