feat: add other filed for search service

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-03-23 13:30:44 +08:00
parent 4776de6bbe
commit 8cc2d8fdf5

View File

@@ -230,7 +230,7 @@ export class SearchService {
const combineDocuments = await Promise.all([
this.postService.model
.find({ hide: false })
.select('title text categoryId category')
.select('title text categoryId category slug')
.populate('category', 'name slug')
.lean()
@@ -246,7 +246,7 @@ export class SearchService {
})
}),
this.pageService.model
.find({}, 'title text')
.find({}, 'title text slug subtitle')
.lean()
.then((list) => {
return list.map((data) => {