Javascript Search Library - 1.4: FullSearch

Javascript Search Library - 1.4: FullSearch

Overview

Instructions to use the search endpoint to retrieve results, links and top trends (i.e. The most popular searches)

Step-by-step guide

You can search using the fullsearch function.

fullsearch (term, start, rows, options, callback)


Parameters

Parameter

Description

Data Type

Mandatory

Parameter

Description

Data Type

Mandatory

terms

The query typed by the user

String

Yes

start

This parameter is used to paginate results from a query

Integer

No

rows

This parameter is used to paginate results from a query

Integer

No

options

Object that may contain information about filters and other required data for example: scope

Object

No

callback

Function that will be executed after sending data

Function

No

Notes:

  • Additional parameters should be included into the options object. The list of parameters that can be included into the options parameter can be checked visiting the Search section of SEARCH REST API

  • To view the format of the JSON result, visit also the Search section of SEARCH REST API


Code samples

var options = { lang:'en', scope:'desktop' } empathySearch.fullsearch('term', 1, 10, options, function(data){ //the data object will contain search results, links and top trends alert('test'); });


Related articles