All predicatesShow sourcedoc_search.pl -- Search form and reply

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
search_match(Match)
What part of the object to match. One of name, summary
header(+Boolean)
If false, suppress the header.
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
search_match(Match)
What part of the object to match. One of name, summary
header(+Boolean)
If false, suppress the header.
Source matching_object_table(+Objects, +Options)// is det
Show a list of matching objects, similar to a result-set from search.
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 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
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 apropos_match(+Needle, +Haystick) is semidet[private]
True if Needle can be found as a case-insensitive substring in Haystick.