From 216ef075e69406ee7a55c54d57b416ad851d7cf4 Mon Sep 17 00:00:00 2001 From: jzonthemtn Date: Sun, 10 Nov 2024 08:37:07 -0500 Subject: [PATCH] Updating build. --- .../qef/clickmodel/coec/CoecClickModel.java | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/opensearch-search-quality-implicit-judgments/src/main/java/org/opensearch/qef/clickmodel/coec/CoecClickModel.java b/opensearch-search-quality-implicit-judgments/src/main/java/org/opensearch/qef/clickmodel/coec/CoecClickModel.java index 80c0223..62dc496 100644 --- a/opensearch-search-quality-implicit-judgments/src/main/java/org/opensearch/qef/clickmodel/coec/CoecClickModel.java +++ b/opensearch-search-quality-implicit-judgments/src/main/java/org/opensearch/qef/clickmodel/coec/CoecClickModel.java @@ -168,32 +168,31 @@ private Map> getClickthroughRate(final int maxRank // TODO: Use maxRank in place of the hardcoded 20. // TODO: Allow for a time period and for a specific application. - final String query = """ - { - "bool": { - "should": [ - { - "term": { - "action_name": "click" - } - }, - { - "term": { - "action_name": "view" - } - } - ], - "must": [ - { - "range": { - "event_attributes.position.index": { - "lte": 20 - } - } - } - ] - } - }"""; + final String query = "{\n" + + " \"bool\": {\n" + + " \"should\": [\n" + + " {\n" + + " \"term\": {\n" + + " \"action_name\": \"click\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"term\": {\n" + + " \"action_name\": \"view\"\n" + + " }\n" + + " }\n" + + " ],\n" + + " \"must\": [\n" + + " {\n" + + " \"range\": {\n" + + " \"event_attributes.position.index\": {\n" + + " \"lte\": 20\n" + + " }\n" + + " }\n" + + " }\n" + + " ]\n" + + " }\n" + + " }"; final BoolQueryBuilder queryBuilder = new BoolQueryBuilder().must(new WrapperQueryBuilder(query)); final SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder().query(queryBuilder).size(1000);