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

Add default values for from/size to document:search #394

Merged
merged 3 commits into from
May 7, 2019

Conversation

Aschen
Copy link
Contributor

@Aschen Aschen commented May 2, 2019

What does this PR do?

Explicitly declare default value for from and size in the request as specified in the documentation.
We have to be explicit otherwise the SearchResult returned can not be used as usual with the next() method.

const result = await this.sdk.document.search(index, collection, { query: 'some query', sort: 'some sort'})
await result.next()
// Unable to retrieve next results from search: missing scrollId, from/sort, or from/size params\nThis is probably not a Kuzzle error, but a problem with a plugin implementation.

@Aschen Aschen self-assigned this May 2, 2019
@codecov
Copy link

codecov bot commented May 7, 2019

Codecov Report

Merging #394 into 6-dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            6-dev     #394      +/-   ##
==========================================
+ Coverage   96.45%   96.46%   +<.01%     
==========================================
  Files          30       30              
  Lines        1440     1443       +3     
==========================================
+ Hits         1389     1392       +3     
  Misses         51       51
Impacted Files Coverage Δ
src/controllers/document.js 94.91% <100%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f699c3b...d100450. Read the comment docs.

@Aschen Aschen merged commit ae1888d into 6-dev May 7, 2019
@Aschen Aschen deleted the fix-document-search-default-values branch May 7, 2019 10:04
@Aschen Aschen mentioned this pull request Jun 14, 2019
Aschen added a commit that referenced this pull request Jun 14, 2019
Release 6.1.2

Bug fixes

    [ #398 ] Fix bulk return (Aschen)
    [ #394 ] Add default values for from/size to document:search (Aschen)
    [ #384 ] Fix search API: "sort" and "search_after" must be in the requests body (scottinet)

Enhancements

    [ #390 ] Add authenticated property on Kuzzle object (Aschen)
    [ #395 ] Proxify kuzzle to avoid mistyping error (thomasarbona)
    [ #389 ] Remove usage of _meta (Aschen)
    [ #391 ] Add isConnected (Aschen)
    [ #388 ] Use BaseController class for controllers (Aschen)
    [ #385 ] Add Security.createRestrictedUser method (Aschen)

Others

    [ #400 ] Fix large document search using scroll (stafyniaksacha)
    [ #387 ] SearchResult.next returns a new instance (Aschen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants