Saved Searches and Get/ Search - 02255528

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
jnheilman
User
Posts: 6
Joined: Wed May 25, 2016 9:35 am

Saved Searches and Get/ Search - 02255528

Post by jnheilman » Wed May 25, 2016 9:41 am

We are a marketplace partner attempting to use Client’s saved searches in order to identify their defined group of candidates. Our goal is to pull their saved searches (Get /savedsearch) and used their saved search query in order to return a group of candidates (Get /search)

When we pull a saved search it does return a query, however, when we attempt to run that query it does not work. It either does not return candidates, when it should, or it returns the following response (specific to notes) " Cannot get field meta for ‘notes.id’” specific to notes.

Some examples are below:

A basic example with state:
- Save a search with the search criteria - "State is California”
- get/ saved search, query returns - address.state:california
- Which doesn’t work through the Get /search API.
- However, it works without the “address” text.
- So this works - state:california
-- How can we consistently return searches without manually adjusting the saved search to match the Lucene syntax?

This one is specific to tear sheets, it doesn’t return results using the saved query or any other variations we could think of:
- We tried mulitple variations of the tearsheet query using a single ID, the shortlist name instead of tearsheet, and couldn't get anything to work.
- We can't even get it to work with ID's right now but we'd actually prefer to query using the tearsheet name if possible.

Tearsheets Query: tearsheets.id:(2 1)
Response: No error but returns 0 candidates even though those tearsheets have candidates

-- Similarly, assuming we can search by tearsheet as can be done in the front end, what is the proper syntax?

This example is looking for the candidates added in the last 30 days without a note action of prescreen or left message.
- Query returned from get/ savedsearch: notes.id:"^^dateAdded:[20160417 TO 20160517235959]" AND NOT notes.id:"^^action:(prescreen 'left message')"
- Response: Cannot get field meta for 'notes.id'
-- We didn't attempt to change this one to try to make it work

Is there some kind of data transformation that happens from the saved search to the get/ search? Is there any way to consistently decode this if so? Are there other suggestions for ways to accomplish the goal of returning all the candidates that match the criteria of a Client’s saved search?

Thanks

jnheilman
User
Posts: 6
Joined: Wed May 25, 2016 9:35 am

Re: Saved Searches and Get/ Search

Post by jnheilman » Wed Jun 01, 2016 10:43 am

We have found the answer to one of the questions, but it posed an additional problem.

Although the saved searches return a field name of "tearsheets.id:" to search tearsheets, we found (through trial and error) that the field to search the Lucene index should actually be "shortListIDs:".

With that we are able to successfully run the Get/ Search call and return candidtes candidates, however, it is not returning all of the candidates associated to a tearsheet. It should have returned 9,932 candidates but only returned 662.

We are able to get the candidate count both from the client front end and running the tearsheet API call.

We would use the tearsheet API call, but the only way to get that many candidates is by using the Get/ search call.

So, we are still left with the original question of
- How can we consistently use the search API call by querying a client's Saved searches, knowing that what is returned from the saved search call does not work for the Get/ Search call?

And a new question of:
- Why are we not getting all of the candidates associated to a tearsheet? Or more broadly not getting all the candidates matching search criteria?

Thanks.

jnheilman
User
Posts: 6
Joined: Wed May 25, 2016 9:35 am

Re: Saved Searches and Get/ Search - 02255528

Post by jnheilman » Wed Jun 01, 2016 1:56 pm

After some additional testing, it appears it is only returning candidates who have been edited after the tearsheet has been created. How do we return candidates who have not been edited at any point since the tearsheet was created.

SO-BHSupport
User
Posts: 24
Joined: Thu Feb 27, 2014 12:49 pm

Re: Saved Searches and Get/ Search - 02255528

Post by SO-BHSupport » Fri Jun 03, 2016 5:34 am

Hi JnHeilman,

My name's Simon from Bullhorn Support and I would like you to know I am looking into this, and can only apologise for the amount of time this has taken for someone to respond.

So looking through the forum posts it appears you have two questions here.

1.) What is the correct workflow/commands to take a saved search from the product and rerun it against your system?

2.) What is the correct workflow/commands to return Candidates/Contacts under a Tearsheet?

Saved Searches
So for your Saved Searches I have run through the below workflow and returned accurate results.

a.) Made a Saved Search within the product and returned it with the following query (just for all savedSearches): https://restX.bullhornstaffing.com/rest ... tToken=XXX

This returned my savedSearch for CONTACT with the query of: isDeleted:0 AND address.state:(+alabama) AND NOT status:Archive

b.) I put this into a search with the below URL and accurate results were returned: https://restX.bullhornstaffing.com/rest ... sDeleted:0 AND address.state:(+alabama) AND NOT status:Archive&BhRestToken=XXXX

So what I think might have happened is your test systems field type may have changed and so the search logic has changed (based on what the data is being inserted as). If you run the savedSearch within the product does it still return accurate results that don't come back when making the same call through the APIs?

Tearsheets
As to Tearsheets I have ran a search (below) which is giving me accurate Contacts based on the Tearsheets they are a part of. This appears to mirror your own testing but has different results - could you try the below and let me know if it was successful on your environment?

https://restX.bullhornstaffing.com/rest ... tToken=XXX

This is all using a standard system and normal REST commands so I do not understand why there would be discrepancies between our systems.

Just for your knowledge to run identical searches using the exact same indexes as Bullhorn you can add the parameter "useV2=true", however I have not required this to get accurate results so far.

Look forward to hearing from you soon.

Kind regards,

Simon O'Keeffe
Simon O'Keeffe
Enterprise Support Team Lead
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 option 1 (UK Support)

DrJones
User
Posts: 22
Joined: Sat Dec 12, 2015 1:20 pm

Re: Saved Searches and Get/ Search - 02255528

Post by DrJones » Fri Jun 03, 2016 11:13 am

Hi Simon, my name is Kevin and I'm the developer working on this on our side. I appreciate your response and the information you've provided. You have a good grasp of the problems we're facing.

To answer your question: If you run the savedSearch within the product does it still return accurate results that don't come back when making the same call through the APIs?
That is correct. When we run the search within the Bullhorn application, we get accurate results. However, when we run the same search through the API, we receive incorrect results.

Also, I ran the exact query that you posted for tearsheets updating with our token and tearsheet id and it returned 0 results instead of 2000+. When we use the syntax shortLidsIDs:1, we do get back 13 candidates. But again, it should be over 2000. Those 13 are candidates that have been modified since we created the tearsheet. And I tried adding useV2=true as a query parameter onto that request, and then it returned 0 candidates.

You mentioned that our test systems field type may have changed. What does that mean? How can we check and see if this happened? Also, you mentioned you performed your testing on a standard system. Is there a non-standard system? And if so, how we can check to see if we're non-standard?

Also, it appears you did your testing searching on contacts. We are searching on candidates, not sure if that might make a difference.

We have a customer that is being held up on this so I appreciate you helping us work through this issue. I look forward to your response.

Thank you,

Kevin

DrJones
User
Posts: 22
Joined: Sat Dec 12, 2015 1:20 pm

Re: Saved Searches and Get/ Search - 02255528

Post by DrJones » Fri Jun 03, 2016 11:42 am

Hi Simon, after some more testing, it looks like the useV2=true actually solves the problems we're having. The queries from the saved searches appear to be working now. So thank you!

SO-BHSupport
User
Posts: 24
Joined: Thu Feb 27, 2014 12:49 pm

Re: Saved Searches and Get/ Search - 02255528

Post by SO-BHSupport » Mon Jun 06, 2016 5:13 am

Hey Kevin,

Glad everything's up and running now! I think there may be an issue with our Candidates then and our saved search logic which I will investigate into outside of this conversation and if I find a bug will escalate this accordingly.

Just to answer a couple of questions for anyone afterwards:

Fields have "types" (dropdown, freetext, radio etc) which can affect how data is stored and is searched on. So if a field was previously a radio option (true/false) or similar, and you used this and saved a search, then changed it to be freetext, it is unlikely that the same results would be returned (this would be reflected in the products searching as well).

I wouldn't say we have "non-standard" systems, but we do have the potential for customisations that can be created for systems. By nature these can cause discrepancies because now there is different code running between my system and yours. Since I couldn't reproduce your tests accurately (probably because I was doing it on a different entity) I suspected this might have been a problem.

Hope this all makes sense and appreciate you getting back confirming what the solution was!

Kind regards,

Simon O'Keeffe
Simon O'Keeffe
Enterprise Support Team Lead
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 option 1 (UK Support)

maryjohn
User
Posts: 5
Joined: Wed Aug 10, 2016 6:04 am

Re: Saved Searches and Get/ Search - 02255528

Post by maryjohn » Wed Aug 10, 2016 6:48 am

After some additional testing, it appears it is only returning candidates who have been edited after the tearsheet has been created. How do we return candidates who have not been edited at any point since the tearsheet was created.
Hello I Am Mary

Post Reply