Relevance V1 will be removed on April 15th, 2019. Relevance V2 is now available.

relevance(data, queries, {[apiKey]: String, [privateCloud]: String})
Convert text into meaningful feature vectors.
Extracts abstract text features for use as inputs to learning algorithms.

Current Version: 1


data – String | List – required – text to be analyzed
queries – String | List – required – a list of queries to run against the document
[apiKey] – String – optional – your indico API key
[privateCloud] – String – optional – your private cloud subdomain
[v or version] – Integer – optional (defaults to 1) – specify model version


This function returns a list of floating point values representing the relevance of a given search query to the provided document or documents. The `data` argument and the `queries` argument may be either a single text string or a list of text strings.

# single output
[0.6740826540660497, 0.16670130847921036]

# batch output


var indico = require('');
indico.apiKey =  'YOUR_API_KEY';

var response = function(res) { console.log(res); }
var logError = function(err) { console.log(err); }
// single example
indico.relevance("Renowned soccer legend Pele will be visiting...", ["team sports", "royalty"])

// batch example
var batchInput = [
    "Renowned soccer legend Pele will be visiting...",
    "The Queen of England will be visiting..."
indico.relevance(batchInput, ["royalty"])