use of com.liferay.portal.kernel.search.Document in project liferay-ide by liferay.
the class AlbumIndexer method doReindex.
@Override
protected void doReindex(Object obj) throws Exception {
Album album = (Album) obj;
Document document = getDocument(album);
}
use of com.liferay.portal.kernel.search.Document in project liferay-ide by liferay.
the class AlbumIndexer method doGetDocument.
@Override
protected Document doGetDocument(Object obj) throws Exception {
Album album = (Album) obj;
Document document = getBaseModelDocument(PORTLET_ID, album);
document.addDate(Field.MODIFIED_DATE, album.getModifiedDate());
document.addText(Field.TITLE, album.getName());
document.addKeyword("year", album.getYear());
Artist artist = ArtistLocalServiceUtil.getArtist(album.getArtistId());
document.addText("artist", artist.getName());
document.addKeyword("artistId", artist.getArtistId());
return document;
}
use of com.liferay.portal.kernel.search.Document in project liferay-ide by liferay.
the class ArtistIndexer method reindexEntries.
protected void reindexEntries(long companyId) throws PortalException, SystemException {
final Collection<Document> documents = new ArrayList<Document>();
ActionableDynamicQuery actionableDynamicQuery = new ArtistActionableDynamicQuery() {
@Override
protected void addCriteria(DynamicQuery dynamicQuery) {
}
@Override
protected void performAction(Object object) throws PortalException {
Artist artist = (Artist) object;
Document document = getDocument(artist);
documents.add(document);
}
};
actionableDynamicQuery.setCompanyId(companyId);
actionableDynamicQuery.performActions();
SearchEngineUtil.updateDocuments(getSearchEngineId(), companyId, documents);
}
use of com.liferay.portal.kernel.search.Document in project liferay-ide by liferay.
the class ArtistIndexer method doReindex.
@Override
protected void doReindex(Object obj) throws Exception {
Artist artist = (Artist) obj;
Document document = getDocument(artist);
SearchEngineUtil.updateDocument(getSearchEngineId(), artist.getCompanyId(), document);
}
use of com.liferay.portal.kernel.search.Document in project liferay-ide by liferay.
the class SongIndexer method doReindex.
@Override
protected void doReindex(Object obj) throws Exception {
Song song = (Song) obj;
Document document = getDocument(song);
SearchEngineUtil.updateDocument(getSearchEngineId(), song.getCompanyId(), document);
}
Aggregations