Skip to content

Commit

Permalink
Renaming queryResponseObjectIds to queryResponseHitIds.
Browse files Browse the repository at this point in the history
Signed-off-by: jzonthemtn <[email protected]>
  • Loading branch information
jzonthemtn committed Dec 5, 2024
1 parent 8dc72e9 commit e0e7cd5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ public class QueryResponse {

private final String queryId;
private final String queryResponseId;
private final List<String> queryResponseObjectIds;
private final List<String> queryResponseHitIds;

/**
* Creates a query response.
* @param queryId The ID of the query.
* @param queryResponseId The ID of the query response.
* @param queryResponseObjectIds A list of IDs for the hits in the query.
* @param queryResponseHitIds A list of IDs for the hits in the query.
*/
public QueryResponse(final String queryId, final String queryResponseId, final List<String> queryResponseObjectIds) {
public QueryResponse(final String queryId, final String queryResponseId, final List<String> queryResponseHitIds) {
this.queryId = queryId;
this.queryResponseId = queryResponseId;
this.queryResponseObjectIds = queryResponseObjectIds;
this.queryResponseHitIds = queryResponseHitIds;
}

/**
Expand All @@ -51,8 +51,8 @@ public String getQueryResponseId() {
* Gets the list of query response hit IDs.
* @return A list of query response hit IDs.
*/
public List<String> getQueryResponseObjectIds() {
return queryResponseObjectIds;
public List<String> getQueryResponseHitIds() {
return queryResponseHitIds;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ public long getCountOfQueriesForUserQueryHavingResultInRankR(final String userQu
for(final SearchHit searchHit : response.getHits().getHits()) {
final List<String> queryResponseObjectIds = (List<String>) searchHit.getSourceAsMap().get("query_response_object_ids");
final List<String> queryResponseHidsIds = (List<String>) searchHit.getSourceAsMap().get("query_response_hit_ids");
if(queryResponseObjectIds.get(rank).equals(objectId)) {
if(queryResponseHidsIds.get(rank).equals(objectId)) {
countOfTimesShownAtRank++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ public int getCountOfQueriesForUserQueryHavingResultInRankR(final String userQue

for(final SearchHit searchHit : response.getHits().getHits()) {

final List<String> queryResponseObjectIds = (List<String>) searchHit.getSourceAsMap().get("query_response_object_ids");
final List<String> queryResponseHitIds = (List<String>) searchHit.getSourceAsMap().get("query_response_hit_ids");

if(queryResponseObjectIds.get(rank).equals(objectId)) {
if(queryResponseHitIds.get(rank).equals(objectId)) {
countOfTimesShownAtRank++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ public class QueryResponse {

private final String queryId;
private final String queryResponseId;
private final List<String> queryResponseObjectIds;
private final List<String> queryResponseHitIds;

/**
* Creates a query response.
* @param queryId The ID of the query.
* @param queryResponseId The ID of the query response.
* @param queryResponseObjectIds A list of IDs for the hits in the query.
* @param queryResponseHitIds A list of IDs for the hits in the query.
*/
public QueryResponse(final String queryId, final String queryResponseId, final List<String> queryResponseObjectIds) {
public QueryResponse(final String queryId, final String queryResponseId, final List<String> queryResponseHitIds) {
this.queryId = queryId;
this.queryResponseId = queryResponseId;
this.queryResponseObjectIds = queryResponseObjectIds;
this.queryResponseHitIds = queryResponseHitIds;
}

/**
Expand All @@ -43,8 +43,8 @@ public String getQueryResponseId() {
* Gets the list of query response hit IDs.
* @return A list of query response hit IDs.
*/
public List<String> getQueryResponseObjectIds() {
return queryResponseObjectIds;
public List<String> getQueryResponseHitIds() {
return queryResponseHitIds;
}

}

0 comments on commit e0e7cd5

Please sign in to comment.