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

Conversation

Projects
None yet
2 participants
@joschi
Contributor

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

Fix parameters for count query in Searches#count()
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

@joschi joschi added this to the 2.3.0 milestone May 23, 2017

@joschi joschi requested a review from dennisoelkers May 23, 2017

}
// 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

This comment has been minimized.

Member

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

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
graylog-project/pr Jenkins build graylog-project-pr-snapshot 149 has succeeded
Details

@dennisoelkers dennisoelkers deleted the issue-3841 branch May 24, 2017

joschi added 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