Class: Client

Client


new Client(options)

Solr Node Client

Parameters:
Name Type Description
options Object
Properties
Name Type Argument Description
host String <optional>

host address of Solr server

port Number | String <optional>

port number of Solr server

core String <optional>

client core name

rootPath String <optional>

solr root path

protocol String <optional>

request protocol ('http'|'https')

debugLevel String <optional>

log4js debug level ('ALL'|'DEBUG'|'INFO'|'ERROR'|...)

Methods


_requestGet(path, query, finalCallback)

Request get

Parameters:
Name Type Description
path String

target path

query Object | String

query

finalCallback function

(err, result)

Returns:
  • When there's no callback function it returns a PromiseŰ
Type
undefined | Promise

_requestPost(path, data, urlOptions, finalCallback)

Request post

Parameters:
Name Type Description
path String

target path

data Object

json data

urlOptions Object | String

url options

finalCallback function

(err, result)

Returns:
  • When there's no callback function it returns a PromiseŰ
Type
undefined | Promise

commit(finalCallback)

Commit

Parameters:
Name Type Description
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

delete(query [, options], finalCallback)

Delete

Parameters:
Name Type Argument Description
query String | Object

query

options Object | function <optional>

delete options

finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

mlt(query, finalCallback)

Mlt

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

ping(finalCallback)

Ping

Parameters:
Name Type Description
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

query()

Make Query instance and return

Returns:
Type
Object

Search

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

softCommit(finalCallback)

SoftCommit

Parameters:
Name Type Description
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

spell(query, finalCallback)

Spell

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

terms(query, finalCallback)

Terms

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)

Returns:
Type
Undefined | Promise

update(data [, options], finalCallback)

Update

Parameters:
Name Type Argument Description
data Object

json data

options Object | function <optional>

update options

finalCallback function

(err, result)

Returns:
Type
Undefined | Promise