2
0
Эх сурвалжийг харах

Merge pull request #604 from VitoVan/master

:children_crossing: 优化检索结果,支持变格单词高亮
Bhikkhu China Kosalla 4 жил өмнө
parent
commit
24e2fddae4

+ 4 - 4
app/fts/example.php

@@ -33,8 +33,8 @@
     }
     }
     ?>
     ?>
     <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
     <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
-      Name: <input type="text" name="q" value="<?php echo $q ?>">
-      <input type="submit">
+      Text: <input type="text" name="q" value="<?php echo $q ?>">
+      <input type="submit" value="Query">
     </form>
     </form>
     <?php
     <?php
     if (empty($q)) {
     if (empty($q)) {
@@ -53,8 +53,8 @@
                      full_text_search_weighted_unaccent,
                      full_text_search_weighted_unaccent,
                      websearch_to_tsquery('pali_unaccent', '$q'))
                      websearch_to_tsquery('pali_unaccent', '$q'))
                  AS rank,
                  AS rank,
-                 ts_headline('simple', content,
-                              websearch_to_tsquery('simple', '$q'),
+                 ts_headline('pali', content,
+                              websearch_to_tsquery('pali', '$q'),
                               'StartSel = <span>, StopSel = </span>')
                               'StartSel = <span>, StopSel = </span>')
                  AS highlight,
                  AS highlight,
                  *
                  *

BIN
app/fts/example.png