Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This how-to-guide explains how specific additional non-default fields can be displayed when building a search interface.

Info

The interface created via the console uses the Website Search Integration. It default search for websites returns title, description, image(optional) and URL by default. It does not allow you to render other fields as it is built specifically for website search. You can retrieve additional fields by following the instructions below.

Instructions

Use the "fields" parameter in your query to specify the fields you want in the response. For example, the following query will return ‘title’, ‘URL’, and ‘published_time’ field.

...

1. Request the fields you want using the values object.

Code Block
const values = new Values(
    {"fields":"title,url,published_time"});

2. Remap the fields or use a custom renderer to render fields in the results component. See the detailed documentation to learn more.

Note that if the record in your collection doesn’t have values for a field, then those values will not be returned in the response. For example, if one record doesn’t have ‘published_time’ value, it will still be returned in response with title and url.
If you want to only return fields that have all these three values, then you will have to use filters (e.g. "filter":"title!='',url!='',published_time>'2000-01-01'" or use an IS_NOT_NULL operator)

Documentation

Filtering Content

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
showSpacefalse
sorttitle
typeshowSpacepagefalse
reversetrue
labelstypecrawlerpage
cqllabel = "integration" and type = "page" and space = "KB"
labelscrawler