Skip to content

Commit

Permalink
fix: search query index fix (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
sambit-sankalp authored May 14, 2022
1 parent be8a68d commit 3aa3147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/schema/article/article.datasources.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ARTICLE_PUBLISH_TYPES = Object.fromEntries(
const getBaseConditions = (allowRestricted, onlyPublished) => {
const _baseConditions = [];
if (!allowRestricted) {
_baseConditions.push({ isInstituteRestrcited: false });
_baseConditions.push({ isInstituteRestricted: false });
}
if (onlyPublished) {
_baseConditions.push({ publishStatus: ARTICLE_PUBLISH_TYPES.PUBLISHED });
Expand Down Expand Up @@ -99,7 +99,7 @@ const search = (keywords, allowRestricted, onlyPublished, limit, offset) =>
ArticleModel.aggregate([
{
$search: {
index: 'default',
index: 'articleSearch',
text: {
query: keywords,
path: ['title', 'inshort', 'tags.name'],
Expand Down

0 comments on commit 3aa3147

Please sign in to comment.