/search/JobOrder wit multiple Lucene Queries returns no data

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
labithiotis
User
Posts: 5
Joined: Wed Apr 23, 2014 5:16 am

/search/JobOrder wit multiple Lucene Queries returns no data

Post by labithiotis » Tue May 06, 2014 9:14 am

Trying to do a Job Search for only entities with status of Placed (also doing a search with "Accepting")

When i use this URL:
restURL/search/JobOrder?
showEditable=false
&BhRestToken=XXXXXXXXXXXX
&query=title:developer%20AND%20status:%27Placed%27AND%20isOpen:1%20AND%20isPublic:0
&count=10
&fields=id,isOpen,isPublic,status,address(state),title,publicDescription,categories(name)

I get zero records returned, however I know the job exist (restURL/entity/JobOrder/88):

Code: Select all

"id" : 88,
    "isOpen" : true,
    "isPublic" : 0,
    "status" : "Placed",
    "address" : {
      "state" : ""
    },
    "title" : "Developer",
    "publicDescription" : "",
    "categories" : {
      "total" : 1,
      "data" : [ {
        "id" : 768832,
        "name" : "Support"
      } ]
    }
I have tried just using the query title and status (no isOpen or isPublic) with same zero result count.

Also trying to pass in a category name to filter the results but that doesn't seem to work either. I am doing it by setting a where on the field for categories : restURL/search/JobOrder?
showEditable=false
&BhRestToken=XXXXXXXXXXXX
&query=title:IT%20AND%20status:%27Accepting%27AND%20isOpen:1%20AND%20isPublic:1
&count=10
&fields=id,isOpen,isPublic,status,address(state),title,publicDescription,categories(name){name='Support'}

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

Re: /search/JobOrder wit multiple Lucene Queries returns no data

Post by SO-BHSupport » Mon May 12, 2014 8:58 am

Hi Labithiotis,

My name's Simon from Bullhorn Support and I have identified why your Rest URL is failing with 0 results. The reason for this is you have surrounded your Status: Placed to look like Status:'Placed' (as you are using %27 not %20), which means it is looking for 'Placed' not Placed.

To resolve this all you need to do is amend your REST URL to look like the below:

<RESTURL>/search/JobOrder?showEditable=false&query=title:developer AND status:Placed AND isOpen:1 AND isPublic:0&count=10&fields=id,isOpen,isPublic,status,address(state),title,publicDescription,categories(name)&BhRestToken=xxxxxxxxxxxxxxxxxxxxxxx

where the spaces are all %20.

Hope this helps!

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)

Post Reply