/[LeafOK_CVS]/fenglin/bbs/search_article_v2.php
ViewVC logotype

Diff of /fenglin/bbs/search_article_v2.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Wed Jan 21 07:58:27 2026 UTC Revision 1.4 by sysadm, Wed Jan 21 13:37:51 2026 UTC
# Line 1  Line 1 
1  <?php  <?php
2          require_once "../lib/db_open.inc.php";          require_once "../lib/db_open.inc.php";
3            require_once "../conf/solr.conf.php";
4          require_once "./session_init.inc.php";          require_once "./session_init.inc.php";
5          require_once "./theme.inc.php";          require_once "./theme.inc.php";
6    
# Line 68  Line 69 
69          }          }
70    
71          // Initialize Solr client          // Initialize Solr client
         $solr_options = array  
         (  
                 "hostname" => "localhost",  
                 "port"     => "8983",  
                 "path"     => "/solr/lbbs",  
         );  
   
72          $solr_client = new SolrClient($solr_options);          $solr_client = new SolrClient($solr_options);
73    
74          $query_str = "" .          $query_str = "" .
75                  ($sid_list == "(-1)" ? "" : "SectionId:($sid_list) AND ") .                  ($sid_list == "(-1)" ? "" : "SectionId:($sid_list) AND ") .
76                  ($reply ? "" : "TopicId:0 AND ") .                  ($reply ? "" : "TopicId:0 AND ") .
77                    ($uid == 0 ? "" : "PostUserId:($uid) AND ") .
78                  ($username == "" ? "" : "PostUserName:($username) AND ") .                  ($username == "" ? "" : "PostUserName:($username) AND ") .
79                  ($nickname == "" ? "" : "PostUserNickName:($nickname) AND ") .                  ($nickname == "" ? "" : "PostUserNickName:($nickname) AND ") .
80                  ($ex == 1 ? "Excerption:1 AND " : "") .                  ($ex == 1 ? "Excerption:1 AND " : "") .
81                  ($original ? "Eransship:0 AND " : "") .                  ($original ? "Transship:0 AND " : "") .
82                  "PostDateTime:[" . $begin_dt->setTimezone(new DateTimeZone("UTC"))->format("Y-m-d\T00:00:00\Z") . " TO " .                  "PostDateTime:[" . $begin_dt->setTimezone(new DateTimeZone("UTC"))->format("Y-m-d\T00:00:00\Z") . " TO " .
83                          $end_dt->setTimezone(new DateTimeZone("UTC"))->format("Y-m-d\T23:59:59\Z") . "] AND " .                          $end_dt->setTimezone(new DateTimeZone("UTC"))->format("Y-m-d\T23:59:59\Z") . "] AND " .
84                  ($title == "" ? "" : "ArticleTitle:($title) AND ") .                  ($title == "" ? "" : "ArticleTitle:($title) AND ") .


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1