diff --git a/convex/posts.ts b/convex/posts.ts index 278c537..581dfe6 100644 --- a/convex/posts.ts +++ b/convex/posts.ts @@ -278,7 +278,9 @@ export const getPostsBySearchTerm = query({ handler: async (ctx, args) => { return await ctx.db .query('posts') - .withSearchIndex('search_by_content', q => q.search('content', args.term)) + .withSearchIndex('search_by_content', q => + q.search('content', args.term).eq('parentPostId', undefined) + ) .paginate(args.paginationOpts); }, });