Skip to content

Commit

Permalink
max_docs_per_hop must be max_docs_per_query in the Resolution API han…
Browse files Browse the repository at this point in the history
…dler.
  • Loading branch information
davemoore- committed Apr 2, 2018
1 parent 2ebe333 commit 6cde2ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -259,7 +259,7 @@ protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient
Boolean includeHits = restRequest.paramAsBoolean("hits", Job.DEFAULT_INCLUDE_HITS);
Boolean includeQueries = restRequest.paramAsBoolean("queries", Job.DEFAULT_INCLUDE_QUERIES);
Boolean includeSource = restRequest.paramAsBoolean("_source", Job.DEFAULT_INCLUDE_SOURCE);
int maxDocsPerQuery = restRequest.paramAsInt("max_docs_per_hop", Job.DEFAULT_MAX_DOCS_PER_QUERY);
int maxDocsPerQuery = restRequest.paramAsInt("max_docs_per_query", Job.DEFAULT_MAX_DOCS_PER_QUERY);
int maxHops = restRequest.paramAsInt("max_hops", Job.DEFAULT_MAX_HOPS);
Boolean pretty = restRequest.paramAsBoolean("pretty", Job.DEFAULT_PRETTY);
Boolean profile = restRequest.paramAsBoolean("profile", Job.DEFAULT_PROFILE);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/zentity/resolution/JobIT.java
Expand Up @@ -103,7 +103,7 @@ public void testJob() throws Exception {

public void testJobMaxHopsAndDocs() throws Exception {
prepareTestResources();
String endpoint = "_zentity/resolution/zentity_test_entity_a?max_hops=2&max_docs_per_hop=2";
String endpoint = "_zentity/resolution/zentity_test_entity_a?max_hops=2&max_docs_per_query=2";
Response response = client.performRequest("POST", endpoint, params, testJobMaxHopsAndDocsPayload);
JsonNode json = mapper.readTree(response.getEntity().getContent());
assertEquals(json.get("hits").get("total").asInt(), 20);
Expand Down

0 comments on commit 6cde2ef

Please sign in to comment.