Search regular expression in Mulitple Collection

Hello guys,

I have two collection.

  1. Companies
  2. jobs

1.Company schema

    company_id: Number, 
    company_name : String,
    company_email : String,
    .....some other info 

2. Job Schema

    job_id: Number, 
    job_title : String,
    job_role : String,
    job_location : String,
    .....some other info 

I want to search a text in following field

  1. company_name {company Schema}
  2. Job_role { Jobs schema }
  3. Job_title { Job schema }

I have some regular expression and I want to search it

How can I do it ?

I’d recommend using Atlas Search.

Here is a tutorial for how to search across multiple collections.

If there collections live in different databases, here is a tutorial for cross-cluster search.

1 Like