Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Sep 13, 2017

The size=0 parameter can be confusing for some users.

@tlrx tlrx added :Search Relevance/Suggesters "Did you mean" and suggestions as you type >docs General docs changes review v6.0.0 v6.1.0 v7.0.0 labels Sep 13, 2017

[source,js]
--------------------------------------------------
POST music/_search?size=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see why this is confusing, but it's also an interesting piece of information that this size refers to the number of search hits to return. Maybe leave this and extend <3> to briefly explain the difference and why size=0 makes sense here as the url parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Christoph and I talked about this and it seems like Elasticsearch is already optimized when suggest only search requests are executed (see QueryPhase.execute(SearchContext searchContext)), so it seems like adding the size=0 does not really make sense.

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlrx looks good, I left a comment about if it might be useful to explain the difference between the two "size" parameters in the second example. Let me know if you think this is too confusing for a casual reader.

@tlrx tlrx merged commit 7404221 into elastic:master Sep 13, 2017
@tlrx tlrx deleted the doc-completion-suggester branch September 13, 2017 15:38
@tlrx
Copy link
Member Author

tlrx commented Sep 13, 2017

Thanks @cbuescher !

jasontedor added a commit to synhershko/elasticsearch that referenced this pull request Sep 14, 2017
* master: (39 commits)
  [Docs] Correct typo in removal_of_types.asciidoc (elastic#26646)
  [Docs] "The the" is a great band, but ... (elastic#26644)
  Move all repository-azure classes under one single package (elastic#26624)
  [Docs] Update link in removal_of_types.asciidoc (elastic#26614)
  Fix percolator highlight sub fetch phase to not highlight query twice (elastic#26622)
  Refactor bootstrap check results and error messages
  Add BootstrapContext to expose settings and recovered state to bootstrap checks (elastic#26628)
  [Tests] Removing skipping tests in search rest tests
  Initialize checkpoint tracker with allocation ID
  Move non-core mappers to a module. (elastic#26549)
  [Docs] Clarify size parameter in Completion Suggester doc (elastic#26617)
  Add soft limit on allowed number of script fields in request (elastic#26598)
  Remove MapperService#dynamic. (elastic#26603)
  Fix incomplete sentences in parent-join docs (elastic#26623)
  More efficient encoding of range fields. (elastic#26470)
  Ensure module is bundled before installing in tests
  Add boolean similarity to built in similarity types (elastic#26613)
  [Tests] Remove skip tests in search/30_limits.yml
  Let search phases override max concurrent requests
  Add a soft limit for the number of requested doc-value fields (elastic#26574)
  ...
@lcawl lcawl removed the v6.1.0 label Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>docs General docs changes :Search Relevance/Suggesters "Did you mean" and suggestions as you type v6.0.0-rc1 v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants