Explorar el Código

:children_crossing: 优化检索结果,支持变格单词高亮

Vito Van hace 4 años
padre
commit
7581c04a9c
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      app/fts/example.php
  2. BIN
      app/fts/example.png

+ 4 - 4
app/fts/example.php

@@ -33,8 +33,8 @@
     }
     ?>
     <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>
     <?php
     if (empty($q)) {
@@ -53,8 +53,8 @@
                      full_text_search_weighted_unaccent,
                      websearch_to_tsquery('pali_unaccent', '$q'))
                  AS rank,
-                 ts_headline('simple', content,
-                              websearch_to_tsquery('simple', '$q'),
+                 ts_headline('pali', content,
+                              websearch_to_tsquery('pali', '$q'),
                               'StartSel = <span>, StopSel = </span>')
                  AS highlight,
                  *

BIN
app/fts/example.png