Did you know ... Search Documentation:
doc_search.pl -- Search form and reply
PublicShow source
To be done
- Advanced search field
  • Limit to a directory
  • Whole-word search
Source search_form(+Options)//
Create a search input field. The input field points to /search?for=String on the current server. Options:
  • title(Title)
Source search_field(+Options)// is det[private]
Hookable predicate to display the search field. Hookability is provided to experiment with auto-completion outside this package.
Source search_reply(+For, +Options)// is det
Generate a reply searching for For. Options include
resultFormat(Format)
If summary (default), produce a summary-table. If long, produce full object descriptions.
search_in(In)
Determine which databases to search. One of all, app, man
private(Boolean)
If false (default true), hide private predicates from results.
search_match(Match)
What part of the object to match. One of name, summary
header(+Boolean)
If false, suppress the header.
per_page(+positive_integer)
Number of results per page (default 25).
page(+positive_integer)
Page number to show results for (default 1).
Source matching_object_table(+Objects, +Options)// is det
Show a list of matching objects, similar to a result-set from search.
Source cat_offset(+Offset, -Remaining, +PerCat0, -PerCat) is det[private]
Source cat_limit(+Limit, -Remaining, +PerCat0, -PerCat) is det[private]
Source order_matches(+PerCat, -Ordered) is det[private]
Order matches per category. Each low level object is of the shape q(Q, Object), where Q is a number between 0 and 1, 1 implying a perfect fit.
Source indexed_matches(+Format, +PerCategory, +Options)//[private]
Emit the matches.
Source matches(+Format, +PerCategory, +Options)// is det[private]
Display search matches according to Format.
Arguments:
PerCategory- List of File-Objects
Source search_doc(+SearchString, -PerType:list, +Options) is det[private]
Return matches of SearchString as Type-PerFile tuples, where PerFile is a list File-ListOfObjects.
Source prune_library(+PerCat0, -PerCat) is det[private]
Prune objects from the libary that also appear in the manual.
Source matching_object(+SearchString, -Object, +Options) is nondet[private]
Object matches SearchString. Options include
search_in(In)
One of all, app, man.
search_match(Match)
One of name, summary
Arguments:
Object- Term of the form File-Item
To be done
- Deal with search syntax
Source optimise_search(+Spec, -Optimised)[private]
Optimise a search specification. Currently only deals with the simple case of first searching for a negation and then a positive term.
Source exec_search(+Spec, -Match, +Options) is nondet[private]
Spec is one of
and(Spec, Spec)
Intersection of the specification
not(Spec)
Negation of the specification
quoted(Tokens)
A quoted list of tokens.
Source search_spec(-Search)// is det[private]
Break a search string from the user into a logical expression.
 object_summary(?Object, ?Category, ?Section, ?Summary) is nondet[private]
True if Object is summarised by Summary. This multifile predicate can be extended with other search mechanisms. The returned objects must be handled by object_summaries//2 and objects//2.
Arguments:
Category- Atom describing the source.
Section- Reference to the context of Object.
 doc_category(Name, SortOrder, Description) is nondet[private]
Describe the various categories of search results. Used to create the category headers as well as the advanced search dialog.
Arguments:
SortOrder- Ranges 0..100. Lower values come first
Source match_object(+For, +Object, +Summary, +How, -Quality) is semidet[private]
True when Object with summary text Summary matches For acording to How.
Arguments:
For- is either a token (atom) or a term quoted(Tokens), where Tokens is a list of atoms.
How- is one of name or summary
Quality- is a number in the range 0..1, where 1 means a strong match.