Home> CMS Tutorial> DEDECMS> body text

How to batch index DeDeCms V5.6 data into Taote search engine

藏色散人
Release: 2019-12-20 09:56:46
Original
2181 people have browsed it

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 "
";
Copy after login

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;
Copy after login

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
Copy after login

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!

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
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!