
doc_search.pl -- Search form and reply
search_form(+Options)//- Create a search input field. The input field points to
/search?for=Stringon the current server. Options:title(Title)
search_field(+Options)// is det[private]- Hookable predicate to display the search field. Hookability is provided to experiment with auto-completion outside this package.
search_reply(+For, +Options)// is det- Generate a reply searching for For. Options include
- resultFormat(Format)
- If
summary(default), produce a summary-table. Iflong, produce full object descriptions. - search_in(In)
- Determine which databases to search. One of
all,app,man - private(Boolean)
- If
false(defaulttrue), 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).
matching_object_table(+Objects, +Options)// is det- Show a list of matching objects, similar to a result-set from search.
cat_offset(+Offset, -Remaining, +PerCat0, -PerCat) is det[private]
cat_limit(+Limit, -Remaining, +PerCat0, -PerCat) is det[private]
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.
indexed_matches(+Format, +PerCategory, +Options)//[private]- Emit the matches.
matches(+Format, +PerCategory, +Options)// is det[private]- Display search matches according to Format.
search_doc(+SearchString, -PerType:list, +Options) is det[private]- Return matches of SearchString as Type-PerFile tuples, where PerFile is a list File-ListOfObjects.
prune_library(+PerCat0, -PerCat) is det[private]- Prune objects from the libary that also appear in the manual.
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
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.
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.
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.
- 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.
match_object(+For, +Object, +Summary, +How, -Quality) is semidet[private]- True when Object with summary text Summary matches For acording to How.