Filtering (POST candidates/search) results make no sense

67 views
Skip to first unread message

Alwie Krokant

unread,
May 28, 2018, 6:43:58 AM5/28/18
to CATS API v3
POST /v3/candidates/search?per_page=10
{
  "field": 12494,
  "filter": "between",
  "value": {
    "gte": "2014-01-01T00:00:00+00:00",
    "lte": "2015-01-01T00:00:00+00:00"
  }
}
X-Request-Id: 0db2c1f0-a8a2-46f3-81a5-a9f15d738621

Field 12494 is of type date, there are results, but the value of 12494 is outside the selected range.


Also, when breaking down some more complex queries that seem to fail:
{
  "field": "emails.primary",
  "filter": "is_empty",
  "value": true
}

Returns records with an email address set?
X-Request-Id: 1efd809d-3687-4e8e-b4a2-0562acc69651


Theres more, but when looking at other threads maybe this just requires some reindexing?

Anthony Allan

unread,
Jun 1, 2018, 1:34:10 PM6/1/18
to CATS API v3
Hi Alwie,

What CATS account are you on (either subdomain or site id)? It's possible that some of your data is out of sync for the filtering, and I can look into that.

Alwie Krokant

unread,
Jun 6, 2018, 4:18:01 AM6/6/18
to CATS API v3
Thanks for re-indexing, however, nothing seems to have changed, getting the same results.

Are my expectations false?


In this case, I'm expecting all candidates with a custom date field (12494) in the year 2000:

POST v3/candidates/search
{
  "field": 12494,
  "filter": "between",
  "value": {
    "gte": "2000-01-01T00:00:00+00:00",
    "lte": "2001-01-01T00:00:00+00:00"
  }
}

When doing individual lookups on the resulting candidates I get dates in 1973 for example.
The resultset yields nothing when doing date ranges over several years.
The resultset gets smaller when doing months, but the results still don't fit the requested dates.


Now as an example the other one, I'm looking for all candidates without a primary email address:
{
  "field": "emails.primary",
  "filter": "is_empty",
  "value": true
}
I get results with primary emails set.
However, I just figured out:
{
"not": {
 "field": "emails.primary",
 "
filter": "contains",
 "value": "*"
}
}
does seem to work... 'contains' accepts perfect matches only in this case, unless using a * wildcard which I don't recall being documented anywhere.

Another weird one though:
{
"not": {
 "field": "emails.primary",
 "filter": "contains",
 "value": "*.nl"
}
}
Also seems to work, but still returns some records with null as primary addresses.


I'm lost.

Anthony Allan

unread,
Jun 6, 2018, 4:16:57 PM6/6/18
to CATS API v3
I was able to track down a bug with date filtering on custom fields, and have pushed up a fix to that. Let me know if you're getting results you expect from that now.

I'll be able to look into the other filters issues tomorrow.

Alwie Krokant

unread,
Jun 7, 2018, 4:17:40 AM6/7/18
to CATS API v3
Date filtering works perfectly now, thanks!
Reply all
Reply to author
Forward
0 new messages