Class: DiscoveryV1

DiscoveryV1

new DiscoveryV1(options)

Parameters:
Name Type Description
options
Source:

Members

(static) VERSION_DATE_2016_12_15 :string

Initial release

Type:
  • string
Source:

Methods

addDocument(params, callback) → {ReadableStream|undefined}

Add a document to a collection

Parameters:
Name Type Description
params
Properties
Name Type Attributes Description
environment_id String

environment guid for the collection

collection_id string

the guid of the collection to delete

file Buffer | ReadableStream | Object

a file to post (smaller than 50mb)

configuration_id string <optional>

config guid

metadata string <optional>

file metadata, including content-type (will infer if missing)

callback
Source:
Returns:
Type
ReadableStream | undefined

createCollection(params)

Create a new collection

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String

environment guid for the collection

collection_name string
description string
configuration_id string

configuration to create the collection in

language_code string

currently, only en_us is supported

Source:

deleteCollection(params)

Delete a collection

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String

environment guid for the collection

collection_id string

the guid of the collection to delete

Source:

deleteDocument(params, callback) → {ReadableStream|undefined}

Delete a specific document

Parameters:
Name Type Description
params
Properties
Name Type Description
environment_id String

environment guid for the collection

collection_id string

the guid of the collection to delete

document_id string

the guid of the document to delete

callback
Source:
Returns:
Type
ReadableStream | undefined

getCollection(params)

Get details about a collection

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String
collection_id string
Source:

getCollections(params)

Return the list of collections in the given environment

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String
Source:

getConfiguration(params)

Get details about a configuration

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String
configuration_id String
Source:

getConfigurations(params)

List all configurations

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String
Source:

getEnvironment(params)

Get details about an environment

Parameters:
Name Type Description
params Object
Properties
Name Type Description
environment_id String
Source:

getEnvironments(params)

Return the list of environments

Parameters:
Name Type Description
params Object
Source:

query(params)

Queries the collection

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
environment_id String
collection_id string
filter String <optional>

A cacheable query that allows you to limit the information returned to exclude anything that isn't related to what you are searching. Filter searches are better for metadata type searches and when you are trying to get a sense of concepts in the dataset.

query String <optional>

A query search returns all possible results, even when it's not very relevant, with the most relevant documents listed first. Use a query search when you want to find the most relevant search results. Results are scored between 0 and 1, with 1 being an exact match and 0 being not a match at all.

aggregation String <optional>

An aggregation search uses combinations of filters and query search to return an exact answer. Aggregations are useful for building applications, because you can use them to build lists, tables, and time series. For a full list of possible aggregrations, see the Query reference.

count Number <optional>
10

Number of documents to return

return String <optional>

A comma separated list of the portion of the document hierarchy to return.

offset Number <optional>
0

For pagination purposes. Returns additional pages of results. Deep pagination is highly unperformant, and should be avoided.

Source: