use of teammates.storage.search.SearchDocument in project teammates by TEAMMATES.
the class InstructorsDb method putDocuments.
/**
* Batch creates or updates documents for the given instructors.
*/
public void putDocuments(List<InstructorAttributes> instructorParams) {
List<SearchDocument> instructorDocuments = new ArrayList<>();
for (InstructorAttributes instructor : instructorParams) {
if (instructor.key == null) {
instructor = this.getInstructorForEmail(instructor.courseId, instructor.email);
}
// defensive coding for legacy data
if (instructor.key != null) {
instructorDocuments.add(new InstructorSearchDocument(instructor));
}
}
putDocuments(Const.SearchIndex.INSTRUCTOR, instructorDocuments);
}
use of teammates.storage.search.SearchDocument in project teammates by TEAMMATES.
the class StudentsDb method putDocuments.
/**
* Batch creates or updates search documents for the given students.
*/
public void putDocuments(List<StudentAttributes> students) {
List<SearchDocument> studentDocuments = new ArrayList<>();
for (StudentAttributes student : students) {
studentDocuments.add(new StudentSearchDocument(student));
}
putDocuments(Const.SearchIndex.STUDENT, studentDocuments);
}
use of teammates.storage.search.SearchDocument in project teammates by TEAMMATES.
the class FeedbackResponseCommentsDb method putDocuments.
/*
* Batch creates or updates search documents for the given comments
*/
public void putDocuments(List<FeedbackResponseCommentAttributes> comments) {
List<SearchDocument> frcSearchDocuments = new ArrayList<>();
for (FeedbackResponseCommentAttributes comment : comments) {
frcSearchDocuments.add(new FeedbackResponseCommentSearchDocument(comment));
}
putDocuments(Const.SearchIndex.FEEDBACK_RESPONSE_COMMENT, frcSearchDocuments);
}
Aggregations