Skip to content

Commit

Permalink
Fixing field name from query_id to user_query.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Dec 10, 2024
1 parent 2a230c3 commit 5400954
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -e

curl -s "http://localhost:9200/click_through_rates/_search" | jq
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class CoecClickModel extends ClickModel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ public void indexClickthroughRates(final Map<String, Set<ClickthroughRate>> clic

final BulkRequest request = new BulkRequest();

for(final String queryId : clickthroughRates.keySet()) {
for(final String userQuery : clickthroughRates.keySet()) {

for(final ClickthroughRate clickthroughRate : clickthroughRates.get(queryId)) {
for(final ClickthroughRate clickthroughRate : clickthroughRates.get(userQuery)) {

final Map<String, Object> jsonMap = new HashMap<>();
jsonMap.put("query_id", queryId);
jsonMap.put("user_query", userQuery);
jsonMap.put("clicks", clickthroughRate.getClicks());
jsonMap.put("events", clickthroughRate.getEvents());
jsonMap.put("ctr", clickthroughRate.getClickthroughRate());
Expand Down

0 comments on commit 5400954

Please sign in to comment.