search.pl -- SWISH search from the navigation bar
This library supports both typeahead of the search box and the actual
search from the server side. What do we want to search for?
- Predicates (built-in, library)
- How should we handle documentation? PlDoc? Manual?
- Source files (name, tags, meta-data, content?)
- Show matching sources in modal dialog and allow switching to
these?
- search_box(+Options)//
- Render a Bootstrap search box.
- typeahead(+Request)[private]
- Support the search typeahead widget. The handler returns a JSON
array of matches. Each match is an object that contains at least
a label.
- typeahead(+Type, +Query, -Match, +Options:dict) is nondet[multifile]
- Find typeahead suggestions for a specific search category
(Type). This oredicate is a multifile predicate, which allows
for adding new search targets. The default implementation
offers:
- predicates
- Searches for built-in and configured library predicates
- sources
- Searches all loaded source files.
- To be done
- - : Limit number of hits?
- match(+Line:string, +Query:string, +Options:dict) is semidet
- True if Line matches Query, respecting Options.