googleapis / nodejs-talent

This repository is deprecated. All of its content and history has been moved to googleapis/google-cloud-node.
https://cloud.google.com/solutions/talent-solution/
Apache License 2.0
24 stars 11 forks source link

Job search in Google Cloud Talent Solution empty #382

Closed alterschwede closed 2 years ago

alterschwede commented 2 years ago

Environment details

Intruduction

I'm having a hard time to get the job search in Google Cloud Talent Solution to work. I already can create/read/update, tenants/companies/jobs indicating that the credentials are ok. But I don't find any jobs searching them.

Currently I have one job stored in Google Cloud Talent Solution. This ist the job export, done with the Google Console:

{
"name":"projects/insurancepunk/tenants/75f8ac52-6e7c-4b00-9220-03771d25e9c5/jobs/135317048994472646",
"requisition_id":"f9bffe6e-3c8c-40d5-b3c3-672d30485745",
"title":"IT-Berater"
}

This is the JSON stringifyed request, passed to "searchJobs":

{
"parent":"projects/insurancepunk/tenants/75f8ac52-6e7c-4b00-9220-03771d25e9c5",
"searchMode":"JOB_SEARCH",
"requestMetadata":{"domain":"insurancepunk.com","sessionId":"8f47bbab-5c15-4bd9-9008-60f79030ab3b","userId":"vCobKcXPFdf6zlVibjnb"},
"jobQuery":{"query":"IT-Berater"}
}

As you can see the project id and the tenant id match the exported job.

This is my very simple code:

const talent = require('@google-cloud/talent').v4;

const client = new talent.JobServiceClient();

      client.searchJobs(request)
      .then(responses => {
        const resources = responses[0];
        for (const resource of resources) {
          console.log(`Job summary: ${resource.jobSummary}`);
          console.log(`Job title snippet: ${resource.jobTitleSnippet}`);
          const job = resource.job;
          console.log(`Job name: ${job.name}`);
          console.log(`Job title: ${job.title}`);
        }
      })
      .catch(err => {
        console.error(err);
      });

The code enters the then-path, but "responses" is empty.

More Information on Stackoverflow: https://stackoverflow.com/questions/70166078/job-search-in-google-cloud-talent-solution-empty (Showing Test with Google OAuth Play ground)

All hints are welcome.

alterschwede commented 2 years ago

Wow! This don't quite smell like Artificial Intelligence...

My one and only job had the Title "IT-Berater". Searching for "IT-Berater" returned an empty result set. However, searching for "Berater" returned the job...

The results are equal no matter if I used the Node.js API ore the original Google HTTP-API...