use of org.opencastproject.index.service.impl.index.event.EventSearchQuery in project opencast by opencast.
the class SeriesIndexUtils method updateEventSeriesTitles.
public static void updateEventSeriesTitles(Series series, String organization, User user, AbstractSearchIndex searchIndex) throws SearchIndexException {
if (!series.isSeriesTitleUpdated())
return;
SearchResult<Event> events = searchIndex.getByQuery(new EventSearchQuery(organization, user).withoutActions().withSeriesId(series.getIdentifier()));
for (SearchResultItem<Event> searchResultItem : events.getItems()) {
Event event = searchResultItem.getSource();
event.setSeriesName(series.getTitle());
searchIndex.addOrUpdate(event);
}
}
Aggregations