-
Notifications
You must be signed in to change notification settings - Fork 208
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
Search Solr using POST instead of GET #129
Merged
+115
−6
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
beeaaf7
* Added post method handler
kfitzgerald da1ad76
* Updated post handler to send and encode parameters accurately
kfitzgerald b3a3c81
* Updated post to compile parameters properly
kfitzgerald 9baa4f0
* Removed console debugging
kfitzgerald bcaf77a
* Added function docs
kfitzgerald 78779f5
* Unnecessary whitespace change
kfitzgerald 06e1838
* Prefer GET for searching, but for large queries use POST
kfitzgerald f247d34
Config Cleanup + Feedback Integration
kfitzgerald 85b502b
Turned off auto-posting by default.
kfitzgerald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Config Cleanup + Feedback Integration
* `get_max` => `get_max_request_entity_size` * Removed local test core from the config (cherry picked from commit ba9fa70)
commit f247d34f3cfe774bca324a341db7ef2c07ede6ec
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 |
---|---|---|
|
@@ -83,7 +83,7 @@ function Client(options){ | |
agent : options.agent, | ||
secure : options.secure || false, | ||
bigint : options.bigint || false, | ||
get_max: options.get_max || 2048 | ||
get_max_request_entity_size: options.get_max_request_entity_size || 2048 | ||
}; | ||
|
||
// Default paths of all request handlers | ||
|
@@ -577,7 +577,7 @@ Client.prototype.get = function(handler,query,callback){ | |
.join('/'), | ||
approxUrlLength = 10 + this.options.host.length + (this.options.port+"").length + fullPath.length; // Buffer (10) accounts for protocol and special characters like ://, port colon, and initial slash etc | ||
|
||
if (approxUrlLength <= this.options.get_max) { | ||
if (approxUrlLength <= this.options.get_max_request_entity_size) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check if this.options.get_max_request_entity_size is truthy first to allow users to bypass this feature if they need to. |
||
var params = { | ||
host: this.options.host, | ||
port: this.options.port, | ||
|
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
"host": "127.0.0.1", | ||
"port": 8983, | ||
"path": "/solr", | ||
"core": "solr_client_test" | ||
"core": null | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default it to false, so that this is not a breaking change
get_max_request_entity_size: options.get_max_request_entity_size || false