Home > Article > CMS Tutorial > How to batch index DeDeCms V5.6 data into Taote search engine
How to batch index DeDeCms V5.6 data into Taote search engine?
DeDeCms V5.6 data batch indexing to Taote search engine
Since DedeCms does not save the generated address of the article in the database, what needs to be done It is to index a field: LinkUrl to save the article generation address.
Recommended study: 梦Weavercms
1. Run Sql statement through Mysql: alter table dede_archives add LinkUrl varchar(255);
2. Back up makehtml_archives_action.php in the backend directory
3. Modify it, change line 110, $rurl = $ac->MakeHtml($isremote); to:
$lnk=$cfg_basehost.$ac->GetTrueUrl($id); $ac->dsql->ExecuteNoneQuery("Update `dede_archives` set LinkUrl='".$lnk."' where id='".$id."'"); echo $lnk; echo "<br>";
4. Go to the background-HTML update-update document HTML and enter the starting ID. Just batch update will do.
5. After updating, restore makehtml_archives_action.php to the original file you just backed up.
6. Create a new table: t_tot
CREATE TABLE `t_tot` ( `id` int(11) NOT NULL auto_increment, `typeid` int(11) default '0', `title` varchar(100) default '', `description` varchar(250) default '', `Datestr` varchar(100) default '', `LinkUrl` varchar(200) default '', `body` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=gbk;
7. Copy the content to the index table
insert into t_tot(id,typeid,title,description,Datestr,LinkUrl,body) SELECT a.id,a.typeid,a.title,a.description,now(),a.LinkUrl,b.body FROM dede_archives a,dede_addonarticle b where a.id=b.aid
8. Import the t_tot table into Sqlserver through Mysql Odbc. Pay attention when connecting. , please choose to compile to GBK, as shown below:
9. Run Reset.aspx index table t_tot
The above is the detailed content of How to batch index DeDeCms V5.6 data into Taote search engine. For more information, please follow other related articles on the PHP Chinese website!