diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-29 16:16:24 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-10 14:02:41 +0200 |
commit | 5fb2e2888ce032c638e4b75d07458642f0833e52 (patch) | |
tree | 8830d873569316889b8134027e9a43b198cca38f /server/initializers/constants.ts | |
parent | 62e7be634bc189f942ae51cb4b080079ab503ff0 (diff) | |
download | PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.tar.gz PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.tar.zst PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.zip |
First implem global search
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index d201df3d8..314f094b3 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -61,6 +61,7 @@ const SORTABLE_COLUMNS = { | |||
61 | 61 | ||
62 | VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending' ], | 62 | VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending' ], |
63 | 63 | ||
64 | // Don't forget to update peertube-search-index with the same values | ||
64 | VIDEOS_SEARCH: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'match' ], | 65 | VIDEOS_SEARCH: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'match' ], |
65 | VIDEO_CHANNELS_SEARCH: [ 'match', 'displayName', 'createdAt' ], | 66 | VIDEO_CHANNELS_SEARCH: [ 'match', 'displayName', 'createdAt' ], |
66 | 67 | ||
@@ -649,6 +650,15 @@ const DEFAULT_USER_THEME_NAME = 'instance-default' | |||
649 | 650 | ||
650 | // --------------------------------------------------------------------------- | 651 | // --------------------------------------------------------------------------- |
651 | 652 | ||
653 | const SEARCH_INDEX = { | ||
654 | ROUTES: { | ||
655 | VIDEOS: '/api/v1/search/videos', | ||
656 | VIDEO_CHANNELS: '/api/v1/search/video-channels' | ||
657 | } | ||
658 | } | ||
659 | |||
660 | // --------------------------------------------------------------------------- | ||
661 | |||
652 | // Special constants for a test instance | 662 | // Special constants for a test instance |
653 | if (isTestInstance() === true) { | 663 | if (isTestInstance() === true) { |
654 | PRIVATE_RSA_KEY_SIZE = 1024 | 664 | PRIVATE_RSA_KEY_SIZE = 1024 |
@@ -704,6 +714,7 @@ export { | |||
704 | API_VERSION, | 714 | API_VERSION, |
705 | PEERTUBE_VERSION, | 715 | PEERTUBE_VERSION, |
706 | LAZY_STATIC_PATHS, | 716 | LAZY_STATIC_PATHS, |
717 | SEARCH_INDEX, | ||
707 | HLS_REDUNDANCY_DIRECTORY, | 718 | HLS_REDUNDANCY_DIRECTORY, |
708 | P2P_MEDIA_LOADER_PEER_VERSION, | 719 | P2P_MEDIA_LOADER_PEER_VERSION, |
709 | AVATARS_SIZE, | 720 | AVATARS_SIZE, |