-
Notifications
You must be signed in to change notification settings - Fork 17
Able to execute document search as GET http method #514
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
Conversation
Codecov Report
@@ Coverage Diff @@
## 7-dev #514 +/- ##
========================================
Coverage ? 95.57%
========================================
Files ? 32
Lines ? 1310
Branches ? 0
========================================
Hits ? 1252
Misses ? 58
Partials ? 0
Continue to review full report at Codecov.
|
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.
Circular dependency: this PR is required by kuzzleio/kuzzle#1629, but kuzzleio/kuzzle#1629 requires it for the bugfix.
This is impossible to release properly.
You should split this PR in two parts: first the bugfix, and then, once a new version of kuzzle containing the fixed SDK version is released, the other part with the new ability to use document:search using the GET verb.
src/controllers/Document.js
Outdated
}; | ||
|
||
for (const opt of ['from', 'size', 'scroll']) { | ||
for (const opt of ['from', 'size', 'scroll', 'verb']) { |
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.
You don't need to pass the verb as an argument since the verb
option on query will change the http verb
for (const opt of ['from', 'size', 'scroll', 'verb']) { | |
for (const opt of ['from', 'size', 'scroll']) { |
src/controllers/Document.js
Outdated
|
||
_search (index, collection, body = {}, options = {}) { | ||
if (options.verb && options.verb.toLowerCase() === 'get') { | ||
if ( this._kuzzle.protocol instanceof HttpProtocol |
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.
It would be better to have a name
property on the protocol objects
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.
yes thanks, I was wondering
a74e09c
to
6b4bade
Compare
|
||
this._pendingRequests = new Map(); | ||
this._host = host; | ||
this._name = name; |
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.
We prefix properties with an underscore as a convention for private properties. You should add a getter, like what's done for other properties.
Seriously? |
sorry, went too fast |
# [7.3.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.3.0) (2020-07-23) #### Bug fixes - [ [#532](#532) ] Encode URI parameters when using the HTTTP protocol ([scottinet](https://github.com/scottinet)) - [ [#516](#516) ] Fix query string construction ([Yoann-Abbes](https://github.com/Yoann-Abbes)) #### New features - [ [#526](#526) ] Add typescript definitions for Auth controller ([Aschen](https://github.com/Aschen)) - [ [#524](#524) ] Support ms:mexecute ([Leodau](https://github.com/Leodau)) - [ [#522](#522) ] Add bulk:deleteByQuery ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#519](#519) ] Add document:updateByQuery ([Yoann-Abbes](https://github.com/Yoann-Abbes)) #### Enhancements - [ [#517](#517) ] Add collection:update and deprecate collection:updateMapping ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#514](#514) ] Able to execute document search as GET http method ([Yoann-Abbes](https://github.com/Yoann-Abbes)) ---
What does this PR do?
Jira ticket
This PR provides the possibility to execute a
document:search
with the GET http verbHow should this be manually tested?
Create a
nyc-open-data' index
andyellow-taxi
collection.Create some files with 2 containing field
{name:"ok"}
Execute this code
Remove the
verb
option and/or change it toPOST
and re-execute the codeBy default,
document:search
is still POSTOther changes
update Mocha to 7.2.0
update codecov to 3.7.0
Boyscout
Removes an unused url who was in conflict with
collection:update
urlFix eslint version for the documentation CI