Browse Source

Merge pull request 'zbx_weibo' (#102) from zbx_weibo into master

Reviewed-on: #102
master
longchao 4 weeks ago
parent
commit
b479ee093c
  1. 4
      model/mEs.php
  2. 2
      tools/es_setting.php

4
model/mEs.php

@ -5,7 +5,7 @@
include_once(SERVER_ROOT . "/model/mBase.php");
class mEs extends mBase {
public $es_host = '127.0.0.1';
public $es_host = '8.154.43.224';
public $es_port = 9200;
public $es_index = '';
@ -82,7 +82,7 @@ class mEs extends mBase {
$highlights = $v['highlight']["content"];
if(!empty($highlights)) {
foreach($highlights as $k=>$val) {
$weibo['text'] = str_replace($val, '<em class="highlight" style="color:green;">'.$val.'</em>', $weibo['text']);
$weibo['text'] = str_replace($val, '<span class="highlight" style="color:red;backgroud:yellow;">'.$val.'</span>', $weibo['text']);
}
}

2
tools/es_setting.php

@ -46,7 +46,7 @@ $log_path_success = '/datacenter/zhishiku/es_success.log';
$log_path_err = '/datacenter/zhishiku/es_error.log';
for($page=0;;$page++){
$sql = "SELECT * FROM spider_weibo where uid=2282201403 and id>".$min_id." order by id asc limit ".$limit;
$sql = "SELECT * FROM spider_weibo where f_mblogid='' and uid=2282201403 and id>".$min_id." order by id asc limit ".$limit;
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {

Loading…
Cancel
Save