| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Instead of shipping a relatively large ~400K documents.js file on
every page load, do it when the user clicks the search text box for
the first time. Local performance measurements show that it takes
about 350ms to build the index from documents.js after fetching it.
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
build_search_documents.py unescapes the escaped tags when creating an
index. This is desired as lunr doesn't index them otherwise. For
example it indexes '<warning>' properly but not
'<warning>'. When we display them on the browser though, we need
to escape them again so that they are not interpreted as real tags.
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
| |
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current script only indexes the first <p> in a text.xml, and
sometimes only partially if the text is interrupted by another tag
such as <c/>.
Modify build_search_documents.py such that:
- It recursively traverses from chapter all the way down to
subsubsection
- Each <p>, <important>, <note>, <warning> is indexed separately
- In the search results, the match entry will have the title in the
form "Chapter[ -> Section[ -> Subsection[ -> Subsubsection]]]"
Modify search.js such that:
- The ref returned for a match is its index into "documents" array,
which makes it possible to retrieve the document in O(1).
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|
|
Bug: https://bugs.gentoo.org/674378
Signed-off-by: Lucas Ramage <ramage.lucas@protonmail.com>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
|