Skip to content

How to use mongoose with atlas search index #12779

Answered by vothvovo
vothvovo asked this question in Q&A

You must be logged in to vote

I got it:

const workflowData: Array<WorkflowType> = await workflow
      .aggregate()
      .search({
        // queryString: { defaultPath: "title", query: args },
        text: {
          query: args,
          path: {
            wildcard: "*",
          },
        },
        index: "index3",
      });

I was too stupid to understand how aggregations work.

Replies: 2 comments 4 replies

You must be logged in to vote
2 replies
@vothvovo

@vothvovo

You must be logged in to vote
2 replies
@RayyanNafees

@heijmerikx

Answer selected by vothvovo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants