Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
#305: The channelId is now included in the result (if available)
Browse files Browse the repository at this point in the history
  • Loading branch information
westei committed Apr 2, 2019
1 parent e91ba31 commit dbb7b88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ private ConversationSectionResult toConversationSectionResult(ComponentConfigura
conversationResult.setReplySuggestion(String.valueOf(solrDocument.getFirstValue(FIELD_MESSAGE)));

conversationResult.setConversationId(String.valueOf(solrDocument.getFieldValue(FIELD_CONVERSATION_ID)));
conversationResult.setChannelId(String.valueOf(solrDocument.getFirstValue(ConversationIndexConfiguration.getMetaField("channel_id"))));

conversationResult.setVotes(Integer.parseInt(String.valueOf(solrDocument.getFieldValue(FIELD_VOTE))));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ConversationSectionResult extends Result {

private double score;
private String conversationId;
private String channelId;
private List<String> messageIds;
private List<Long> messageIdxs;
private String userName;
Expand Down Expand Up @@ -108,6 +109,14 @@ public void setSection(List<SectionMessage> section) {
this.section = section;
}

public String getChannelId() {
return channelId;
}

public void setChannelId(String channelId) {
this.channelId = channelId;
}

public static class SectionMessage {

private String content;
Expand Down Expand Up @@ -156,4 +165,5 @@ public void setTimestamp(Date timestamp) {


}

}

0 comments on commit dbb7b88

Please sign in to comment.