|
|
@@ -309,6 +309,7 @@ class ElasticsearchDelegator {
|
|
|
};
|
|
|
|
|
|
const bookmarkCount = page.bookmarkCount || 0;
|
|
|
+ const seenUsersCount = page.seenUsers.length || 0;
|
|
|
let document = {
|
|
|
path: page.path,
|
|
|
body: page.revision.body,
|
|
|
@@ -316,6 +317,7 @@ class ElasticsearchDelegator {
|
|
|
username: page.creator != null ? page.creator.username : null,
|
|
|
comment_count: page.commentCount,
|
|
|
bookmark_count: bookmarkCount,
|
|
|
+ seenUsers_count: seenUsersCount,
|
|
|
like_count: page.liker.length || 0,
|
|
|
created_at: page.createdAt,
|
|
|
updated_at: page.updatedAt,
|
|
|
@@ -563,7 +565,7 @@ class ElasticsearchDelegator {
|
|
|
|
|
|
createSearchQuerySortedByUpdatedAt(option) {
|
|
|
// getting path by default is almost for debug
|
|
|
- let fields = ['path', 'bookmark_count', 'comment_count', 'updated_at', 'tag_names'];
|
|
|
+ let fields = ['path', 'bookmark_count', 'comment_count', 'seenUsers_count', 'updated_at', 'tag_names'];
|
|
|
if (option) {
|
|
|
fields = option.fields || fields;
|
|
|
}
|
|
|
@@ -584,7 +586,7 @@ class ElasticsearchDelegator {
|
|
|
}
|
|
|
|
|
|
createSearchQuerySortedByScore(option) {
|
|
|
- let fields = ['path', 'bookmark_count', 'comment_count', 'updated_at', 'tag_names'];
|
|
|
+ let fields = ['path', 'bookmark_count', 'comment_count', 'seenUsers_count', 'updated_at', 'tag_names'];
|
|
|
if (option) {
|
|
|
fields = option.fields || fields;
|
|
|
}
|