src/main/java/com/infochimps/elasticsearch/ElasticSearchInputFormat.java in wonderdog-0.1.1 vs src/main/java/com/infochimps/elasticsearch/ElasticSearchInputFormat.java in wonderdog-0.2.0
- old
+ new
@@ -131,11 +131,11 @@
.setSearchType(SearchType.COUNT)
.setQuery(QueryBuilders.queryString(queryString))
.setSize(requestSize)
.execute()
.actionGet();
- this.numHits = response.hits().totalHits();
+ this.numHits = response.getHits().totalHits();
if(numSplits > numHits) numSplits = numHits; // This could be bad
this.numSplitRecords = (numHits/numSplits);
}
protected class ElasticSearchRecordReader extends RecordReader<Text, Text> {
@@ -204,10 +204,10 @@
.setFrom(from.intValue())
.setSize(recsToRead.intValue())
.setQuery(QueryBuilders.queryString(queryString))
.execute()
.actionGet();
- return response.hits().iterator();
+ return response.getHits().iterator();
}
@Override
public boolean nextKeyValue() throws IOException {
if (hitsItr!=null) {