Implement sitewide search for Apostrophe. Provides the
apostrophe-search page type for the
/search page, which
you should include in your "parked pages" if you wish
to have one (see apostrophe-pages).
Search is powered by the full-text search features of MongoDB.
This method implements the search results page. It populates
and provides pagination via
not to be confused with
req.data.totalDocs which is the total number of
documents matching the search. The filters configured for the module are
Called before each page of search results is rendered; override hook
Implementation of search indexing as documents are saved. Invoked via callAll by the docs module
Index one doc for participation in search
apostrophe-search:index task, which re-indexes all pages.
This should only be needed if you have changed your mind about the
searchable property for various schema fields. Indexing is automatic
every time a doc is saved
Indexes just one document as part of the implementation of the
apostrophe-search:index task. This isn't the method you want to
Returns texts which are a reasonable basis for generating search results for this page. Should return an array in which each entry is an object with 'weight' and 'text' properties. 'weight' is a measure of relative importance. 'text' is the text associated with that chunk of content.
Reduces array of texts to a single space-separated string, passes the result through apos.utils.sortify to eliminate unwanted characters and case differences
Invoked by the apostrophe-versions module. Identify fields that should never be rolled back