In HyperDoc, when using search functionality, for example:
click "Browse" -> type "Integer" in search bar -> click "Reference"
The result page is sorting matching count by only 1 digit:

The underlying shell command is:

$FRICAS/lib/hthits Integer $FRICAS/share/hypertex/pages/ht.db | sort -r -n -k 1.22

Some results are:

\newsearchresultentry{9}{9.38.3. Some Number Theoretic Functions}{ugxIntegerNTPage}
\newsearchresultentry{9}{9.21 Expression}{ExpressionXmpPage}
\newsearchresultentry{9}{2.2.5. Abbreviations}{ugTypesWritingAbbrPage}
\newsearchresultentry{8}{9.60 Octonion}{OctonionXmpPage}
\newsearchresultentry{8}{9.38 Integer}{IntegerXmpPage}
......
\newsearchresultentry{3}{6.7. Functions vs. Operations}{ugUserDecOpersPage}
\newsearchresultentry{35}{2.1.1. Domain Constructors}{ugTypesBasicDomainConsPage}
......

This can be fixed by following patch.

- Qian


diff --git a/src/hyper/htsearch b/src/hyper/htsearch
index 8958c89b..24e67d38 100755
--- a/src/hyper/htsearch
+++ b/src/hyper/htsearch
@@ -8,5 +8,5 @@ if test -z "$1"
 then
         echo ""|$htbindir/presea use_case=1 -
 else
-( cd $htpagedir; $htbindir/hthits "$1" $htpagedir/ht.db |sort -r -n -k 1.22 |$htbindir/presea use_case=0 expr="$1" -) +( cd $htpagedir; $htbindir/hthits "$1" $htpagedir/ht.db |sort -r -n -t { -k 2 |$htbindir/presea use_case=0 expr="$1" -)
 fi

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/a526a3f4-c0a4-4a42-bc41-0a2ba243adb1%40gmail.com.

Reply via email to