Search API

by Justin Bodeutsch, Skyler Katz | Last edited: 1/31/2017

Also see the Search Overview.

Search covers the following modules:

  • Sermons
  • Articles
  • Events
  • Products & Families
  • Blogs & Blog Posts
  • Pages
  • Songs & Playlists
  • Media
  • Books
  • Small Groups

Display Mode: Box

Show

There are no show tags that modify how the search form is layed out. A form is auto generated which will link to the search results.

Parameters

number

Used to include a second search form on a template. Currently there is a limit of two search forms per page, number:3 will not work.

Example:

"number:2",

Display Mode: Results

There is no getContent needed to display the search results. By default the form will send users to /search-results/ which will use the default page template and display the results through the normal Page getContent.

A getContent can be used however, to deliver customize results. If no show tags are used a default layout will be used.

Show

Show
Tag Description
__id__ The internal identifier of the item
__title__ The title of the item
__titlelink__ A preformatted link to the item
__slug__ The slug of the item
__url__ An absolute path to the item
__type__ The module of the item
__author__ Where applicable, the author of the item
__summary__ Where applicable, the summary of the item
__description__ The full text of the item
__preview__ A snippet of text highlighting the search terms. HTML is stripped.
A max of 150 characters are displayed. Specified with __preview limit='120'__
Text separator defaults to ' ... ' Specified with __preview separator=' --- '__
The number of words around the search term defaults to 5. Specified with __preview around='10'__
The tags to use around the matched term default to <strong>. Specified with preview beforematch='<i>' aftermatch='</i>__
__tags__ Where applicable, comma separated list of tags for the item
__groups__ A list of groups the content is assigned to
__category__ A comma separated list of categories that the item is assigned (articles, blog posts, events, and sermons only)
before_show, after_show, no_show

no_show will be used if no results are returned.

Tag Description
__term__ The search term that was used
__resultsnumber__ The total number of results returned
__pagination__ Divides the records into smaller groups and provides links to navigate through them

 

Parameters

keywords

If the querystring has 'keywords' in it, this parameter does not need to be included. If this parameter is used, it will override the search term in the querystring.

Example:

"keywords:conference",hide_module

By default all possible modules are included in the search results. This parameter will remove specified modules from the results.

Example:

"hide_module:media,blogs",

find_module

This is the opposite of hide_module. Will only find results in specified modules.

Example:

"find_module:articles,events",
bookpath

If bookpath is set books can be included in the search results. The book list slug and book slug will be appended to this path.

"bookpath:/path/to/books/"

find_group

Only show items assigned to that group Uses group slugs.

Example:

"find_group:group-slug",

hide_group

Hide items assigned to a given group from the results. Uses group slugs.

Example:

"hide_group:group-slug",

find_category

Limit results to content items in a particular item.

Example:

"find_category:category-slug",

hide_category

Hide items assigned to a given category from the results. Uses category slugs.

Example:

"hide_category:category-slug-1,category-slug-2",

match

Specifies what will be searched in each module. Right now the only options are 'all' (default) and 'tags'.

Example:

"match:tags",

howmany

Sets the maximum number of items to display

Example:

"howmany:3",

offset

Skips the first X records returned

Example:

"offset:1",

debug

Will return some info to help debug what is happening with the api call.

Example:

"debug:yes",

order

Specifies the order of the results. 'score' is the default and will return results based on relevance. 'module' will order the results by their module (Articles would be first, blogs second etc).

Example:

"order:module",

groupby

Will group the results. The only current option is 'module'.

Example:

"groupby:module",