diff --git a/server/lib/elastic-search/elastic-search-queries.ts b/server/lib/elastic-search/elastic-search-queries.ts index 6a6ede9..bda2e5e 100644 --- a/server/lib/elastic-search/elastic-search-queries.ts +++ b/server/lib/elastic-search/elastic-search-queries.ts @@ -7,7 +7,8 @@ import { logger } from '../../helpers/logger' async function removeNotExistingIdsFromHost (indexName: string, host: string, existingIds: Set) { const idsFromDB = await getIdsOf(indexName, host) - const idsToRemove = difference(idsFromDB, Array.from(existingIds)) + // Elastic Search limits max terms amount + const idsToRemove = difference(idsFromDB, Array.from(existingIds)).splice(0, 50000) logger.info({ idsToRemove }, 'Will remove %d entries from %s of host %s.', idsToRemove.length, indexName, host) diff --git a/server/lib/elastic-search/elastic-search-videos.ts b/server/lib/elastic-search/elastic-search-videos.ts index 3497147..03247f0 100644 --- a/server/lib/elastic-search/elastic-search-videos.ts +++ b/server/lib/elastic-search/elastic-search-videos.ts @@ -414,7 +414,6 @@ function formatVideoForDB (v: IndexableVideo | IndexableVideoDetails): DBVideo | previewPath: v.previewPath, embedPath: v.embedPath, - views: v.views, viewers: v.viewers, likes: v.likes, @@ -445,7 +444,7 @@ function formatVideoForDB (v: IndexableVideo | IndexableVideoDetails): DBVideo | support: v.support, commentsEnabled: v.commentsEnabled, - downloadEnabled: v.downloadEnabled, + downloadEnabled: v.downloadEnabled } }