4.2. Searchable documents

As a sample application, the Recoll KIO slave could allow preparing a set of HTML documents (for example a manual) so that they become their own search interface inside konqueror.

This can be done by either explicitely inserting <a href="recoll:/..."> links around some document areas, or automatically by adding a very small javascript program to the documents, like the following example, which would initiate a search by double-clicking any term:

<script language="JavaScript">
    function recollsearch() {
        var t = document.getSelection();
        window.location.href = 'recoll://search/query?qtp=a&p=0&q=' +
            encodeURIComponent(t);
    }
</script>
 ....
<body ondblclick="recollsearch()">