Skip to content

Commit 6cde2ef

Browse files
committed
max_docs_per_hop must be max_docs_per_query in the Resolution API handler.
1 parent 2ebe333 commit 6cde2ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/elasticsearch/plugin/zentity/ResolutionAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient
259259
Boolean includeHits = restRequest.paramAsBoolean("hits", Job.DEFAULT_INCLUDE_HITS);
260260
Boolean includeQueries = restRequest.paramAsBoolean("queries", Job.DEFAULT_INCLUDE_QUERIES);
261261
Boolean includeSource = restRequest.paramAsBoolean("_source", Job.DEFAULT_INCLUDE_SOURCE);
262-
int maxDocsPerQuery = restRequest.paramAsInt("max_docs_per_hop", Job.DEFAULT_MAX_DOCS_PER_QUERY);
262+
int maxDocsPerQuery = restRequest.paramAsInt("max_docs_per_query", Job.DEFAULT_MAX_DOCS_PER_QUERY);
263263
int maxHops = restRequest.paramAsInt("max_hops", Job.DEFAULT_MAX_HOPS);
264264
Boolean pretty = restRequest.paramAsBoolean("pretty", Job.DEFAULT_PRETTY);
265265
Boolean profile = restRequest.paramAsBoolean("profile", Job.DEFAULT_PROFILE);

src/test/java/io/zentity/resolution/JobIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void testJob() throws Exception {
103103

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

0 commit comments

Comments
 (0)