Skip to content

Commit

Permalink
Merge pull request #76 from o19s/fixing_map
Browse files Browse the repository at this point in the history
Fixing map variable name for #75
  • Loading branch information
jzonthemtn authored Jan 24, 2025
2 parents af3750c + 72d119b commit 048a670
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/esci/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ echo "Initializing UBI..."
curl -s -X POST "http://localhost:9200/_plugins/ubi/initialize"

echo "Indexing queries and events..."
curl -X POST 'http://localhost:9200/index-name/_bulk?pretty' --data-binary @ubi_queries_events.ndjson -H "Content-Type: application/x-ndjson"
curl -X POST 'http://localhost:9200/_bulk?pretty' --data-binary @ubi_queries_events.ndjson -H "Content-Type: application/x-ndjson"
11 changes: 11 additions & 0 deletions scripts/opensearch-scripts/get-rank-aggregated-ctr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e

curl -s "http://localhost:9200/rank_aggregated_ctr/_search" -H "Content-type: application/json" -d'{
"query": {
"range": {
"ctr": {
"gt": 0
}
}
}
}'
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ public Map<Integer, Double> getRankAggregatedClickThrough(final int maxRank) thr
final List<LongTermsBucket> positionBuckets = positionTerms.lterms().buckets().array();

for(final LongTermsBucket positionBucket : positionBuckets) {
LOGGER.debug("Inserting client event from position {} with click count {}", positionBucket.key(), (double) positionBucket.docCount());
impressionCounts.put(Integer.valueOf(positionBucket.key()), (double) positionBucket.docCount());
LOGGER.debug("Inserting click event from position {} with click count {}", positionBucket.key(), (double) positionBucket.docCount());
clickCounts.put(Integer.valueOf(positionBucket.key()), (double) positionBucket.docCount());
}

}
Expand Down Expand Up @@ -681,6 +681,7 @@ public Map<Integer, Double> getRankAggregatedClickThrough(final int maxRank) thr

}

// Index the calculated values.
indexRankAggregatedClickthrough(rankAggregatedClickThrough);

return rankAggregatedClickThrough;
Expand Down

0 comments on commit 048a670

Please sign in to comment.