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)


_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)


commit(finalCallback)

Commit

Parameters:
Name Type Description
finalCallback function

(err, result)


delete(query, options, finalCallback)

Delete

Parameters:
Name Type Argument Description
query String | Object

query

options Object | function <optional>

delete options

finalCallback function

(err, result)


mlt(query, finalCallback)

Mlt

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)


ping(finalCallback)

Ping

Parameters:
Name Type Description
finalCallback function

(err, result)


query()

Make Query instance and return

Returns:
Type
Object

Search

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)


softCommit(finalCallback)

SoftCommit

Parameters:
Name Type Description
finalCallback function

(err, result)


spell(query, finalCallback)

Spell

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)


terms(query, finalCallback)

Terms

Parameters:
Name Type Description
query Object | String
finalCallback function

(err, result)


update(data, options, finalCallback)

Update

Parameters:
Name Type Argument Description
data Object

json data

options Object | function <optional>

update options

finalCallback function

(err, result)