Sfoglia il codice sorgente

暂时屏蔽全文搜索sql高亮

visuddhinanda 4 anni fa
parent
commit
10d47b2443
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      app/search/paliword_sc.php

+ 1 - 2
app/search/paliword_sc.php

@@ -55,7 +55,6 @@ if (count($arrWordList) > 1) {
     PDO_Connect(_FILE_DB_PALITEXT_,_DB_USERNAME_,_DB_PASSWORD_);
     PDO_Connect(_FILE_DB_PALITEXT_,_DB_USERNAME_,_DB_PASSWORD_);
 
 
 
 
-    //$query = "SELECT ts_rank('{0.1, 0.2, 0.4, 1}', full_text_search_weighted, websearch_to_tsquery('pali', ?)) AS rank, book,paragraph,content as text FROM fts WHERE full_text_search_weighted @@ websearch_to_tsquery('pali', ?) ORDER BY rank DESC LIMIT 20";
     $query = "SELECT
     $query = "SELECT
     ts_rank('{0.1, 0.2, 0.4, 1}',
     ts_rank('{0.1, 0.2, 0.4, 1}',
         full_text_search_weighted,
         full_text_search_weighted,
@@ -66,7 +65,7 @@ if (count($arrWordList) > 1) {
     AS rank,
     AS rank,
     ts_headline('simple', content,
     ts_headline('simple', content,
                  websearch_to_tsquery('simple', ?),
                  websearch_to_tsquery('simple', ?),
-                 'StartSel = <span>, StopSel = </span>')
+                 'StartSel = <highlight>, StopSel = </highlight>')
     AS highlight,
     AS highlight,
     book,paragraph,content 
     book,paragraph,content 
     FROM fts_texts
     FROM fts_texts