-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply automatic formatting via prettier (#237)
- Loading branch information
Showing
68 changed files
with
4,122 additions
and
3,456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "always", | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
/** | ||
* Use Basic HTTP Authentication to communicate with the Solr server. | ||
* Use Basic HTTP Authentication to communicate with the Solr server. | ||
*/ | ||
|
||
// Use `var solr = require('solr-client')` in your code | ||
// Use `var solr = require('solr-client')` in your code | ||
var solr = require('./../lib/solr'); | ||
|
||
var client = solr.createClient(); | ||
client.basicAuth('admin','passtest'); | ||
client.basicAuth('admin', 'passtest'); | ||
|
||
// Use `client.unauth` if you want to remove credentials previously set. | ||
//client.unauth(); | ||
|
||
// You can now search documents using your credentials | ||
var query = client.createQuery().q('laptop').dismax().qf({title_t : 0.2 , description_t : 3.3}).mm(2).start(0).rows(10); | ||
client.search(query,function(err,obj){ | ||
if(err){ | ||
console.log(err); | ||
}else{ | ||
console.log(obj); | ||
} | ||
var query = client | ||
.createQuery() | ||
.q('laptop') | ||
.dismax() | ||
.qf({ title_t: 0.2, description_t: 3.3 }) | ||
.mm(2) | ||
.start(0) | ||
.rows(10); | ||
client.search(query, function (err, obj) { | ||
if (err) { | ||
console.log(err); | ||
} else { | ||
console.log(obj); | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
/** | ||
* Commit your changes in the index with or without options. | ||
* Commit your changes in the index with or without options. | ||
*/ | ||
|
||
// Use `var solr = require('solr-client')` in your code | ||
// Use `var solr = require('solr-client')` in your code | ||
var solr = require('./../lib/solr'); | ||
|
||
var client = solr.createClient(); | ||
|
||
// Commit your changes without options | ||
client.commit(function(err,res){ | ||
if(err) console.log(err); | ||
if(res) console.log(res); | ||
client.commit(function (err, res) { | ||
if (err) console.log(err); | ||
if (res) console.log(res); | ||
}); | ||
|
||
// Commit your changes with `waitSearcher` options. | ||
var options = { | ||
waitSearcher: false | ||
waitSearcher: false, | ||
}; | ||
client.commit(options,function(err,obj){ | ||
if(err){ | ||
console.log(err); | ||
}else{ | ||
console.log(obj); | ||
} | ||
client.commit(options, function (err, obj) { | ||
if (err) { | ||
console.log(err); | ||
} else { | ||
console.log(obj); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.