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

Fix parameters for count query in Searches#count() #3865

Merged
merged 2 commits into from May 24, 2017
Merged

Conversation

@joschi
Copy link
Contributor

@joschi joschi commented May 23, 2017

The Elasticsearch Count API doesn't support "limit", "offset", and "highlight" parameters.

Older versions of Elasticsearch ignored unknown parameters but that changed in Elasticsearch 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/breaking-changes-5.0.html

Fixes #3841

The [Elasticsearch Count API](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-count.html)
doesn't support "limit", "offset", and "highlight" parameters.

Older versions of Elasticsearch ignored unknown parameters but that changed in
Elasticsearch 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/breaking-changes-5.0.html

Fixes #3841
}

// limit, offset, and highlight are *NOT* supported by count queries
final SearchSourceBuilder searchSourceBuilder = standardSearchRequest(query, -1, -1, range, null, null, false);

This comment has been minimized.

@dennisoelkers

dennisoelkers May 24, 2017
Member

What happens with the filter parameter?

@dennisoelkers
Copy link
Member

@dennisoelkers dennisoelkers commented May 24, 2017

Can you please add some tests for count(String, TimeRange, String) that would catch the misuse/lack of use of the filter parameter in a followup PR?

@dennisoelkers dennisoelkers merged commit 4e2c888 into master May 24, 2017
4 checks passed
4 checks passed
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 1667 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@garybot2
graylog-project/pr Jenkins build graylog-project-pr-snapshot 149 has succeeded
Details
@dennisoelkers dennisoelkers deleted the issue-3841 branch May 24, 2017
joschi pushed a commit that referenced this pull request May 24, 2017
dennisoelkers added a commit that referenced this pull request May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants