Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port should be optional #219 #227

Merged
merged 1 commit into from
Dec 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/solr.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function createClient(host, port, core, path, agent, secure, bigint, solrVersion
*
* @param {Object} options - set of options used to request the Solr server
* @param {String} options.host - IP address or host address of the Solr server
* @param {Number|String} options.port - port of the Solr server
* @param {Number|String} options.port - port of the Solr server, 0 to be ignored by HTTP agent in case of using API endpoint.
* @param {String} options.core - name of the Solr core requested
* @param {String} options.path - root path of all requests
* @param {http.Agent} [options.agent] - HTTP Agent which is used for pooling sockets used in HTTP(s) client requests
Expand All @@ -85,7 +85,7 @@ function createClient(host, port, core, path, agent, secure, bigint, solrVersion
function Client(options){
this.options = {
host : options.host || '127.0.0.1',
port : options.port || '8983',
port : options.port === 0 ? 0 : options.port || '8983',
core : options.core || '',
path : options.path || '/solr',
agent : options.agent,
Expand Down