Skip to content

[docs] Fix typoes in comment in source code #28098

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

Merged
merged 3 commits into from
Jan 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private void executeSearch(SearchTask task, SearchTimeProvider timeProvider, Sea

// optimize search type for cases where there is only one shard group to search on
if (shardIterators.size() == 1) {
// if we only have one group, then we always want Q_A_F, no need for DFS, and no need to do THEN since we hit one shard
// if we only have one group, then we always want Q_T_F, no need for DFS, and no need to do THEN since we hit one shard
searchRequest.searchType(QUERY_THEN_FETCH);
}
if (searchRequest.isSuggestOnly()) {
Expand All @@ -338,8 +338,8 @@ private void executeSearch(SearchTask task, SearchTimeProvider timeProvider, Sea
if (searchRequest.isMaxConcurrentShardRequestsSet() == false) {
// we try to set a default of max concurrent shard requests based on
// the node count but upper-bound it by 256 by default to keep it sane. A single
// search request that fans out lots of shards should hit a cluster too hard while 256 is already a lot
// we multiply is by the default number of shards such that a single request in a cluster of 1 would hit all shards of a
// search request that fans out lots of shards should hit a cluster too hard while 256 is already a lot.
// we multiply it by the default number of shards such that a single request in a cluster of 1 would hit all shards of a
// default index.
searchRequest.setMaxConcurrentShardRequests(Math.min(256, nodeCount
* IndexMetaData.INDEX_NUMBER_OF_SHARDS_SETTING.getDefault(Settings.EMPTY)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ private void parseSource(DefaultSearchContext context, SearchSourceBuilder sourc

/**
* Shortcut ids to load, we load only "from" and up to "size". The phase controller
* handles this as well since the result is always size * shards for Q_A_F
* handles this as well since the result is always size * shards for Q_T_F
*/
private void shortcutDocIdsToLoad(SearchContext context) {
final int[] docIdsToLoad;
Expand Down Expand Up @@ -963,7 +963,7 @@ public boolean canMatch(ShardSearchRequest request) throws IOException {
}

/**
* Returns true iff the given search source builder can be early terminated by rewriting to a match none query. Or in other words
* Returns true if the given search source builder can be early terminated by rewriting to a match none query. Or in other words
Copy link
Member

Choose a reason for hiding this comment

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

I think iff is intended here, meaning "if and only if" here (https://en.wikipedia.org/wiki/If_and_only_if), I'd leave this as is.

* if the execution of a the search request can be early terminated without executing it. This is for instance not possible if
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you just changed both the first occurance of "iff" and the later "if" to the other version. Could you just change them back?

* a global aggregation is part of this request or if there is a suggest builder present.
*/
Expand Down