lewismc commented on a change in pull request #7: SDAP-35 Overhaul MUDROD 
configuration
URL: 
https://github.com/apache/incubator-sdap-mudrod/pull/7#discussion_r173496493
 
 

 ##########
 File path: 
core/src/main/java/org/apache/sdap/mudrod/weblog/pre/HistoryGenerator.java
 ##########
 @@ -79,13 +77,21 @@ public void generateBinaryMatrix() {
       String[] logIndices = logIndexList.toArray(new String[0]);
       String[] statictypeArray = new String[] { this.sessionStats };
       int docCount = es.getDocCount(logIndices, statictypeArray);
+      
+      LOG.info(this.sessionStats + ":" + docCount);      
+      if (docCount==0) 
+      { 
+        bw.close(); 
+        file.delete();
+        return;
+      }
 
       SearchResponse sr = 
es.getClient().prepareSearch(logIndices).setTypes(statictypeArray).setQuery(QueryBuilders.matchAllQuery()).setSize(0)
           
.addAggregation(AggregationBuilders.terms("IPs").field("IP").size(docCount)).execute().actionGet();
       Terms ips = sr.getAggregations().get("IPs");
       List<String> ipList = new ArrayList<>();
       for (Terms.Bucket entry : ips.getBuckets()) {
-        if (entry.getDocCount() > 
Integer.parseInt(props.getProperty(MudrodConstants.MINI_USER_HISTORY))) { // 
filter
+        if (entry.getDocCount() >= 
Integer.parseInt(props.getProperty(MudrodConstants.QUERY_MIN))) { // filter
 
 Review comment:
   Why do we now make this inclusive?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to