Accelerate the Value of Data

Multiple Faceted Search

Executes a facet search for several facets.

This function, within one request, executes a facet search for several facets.

Request

POST {TenantURL}/entities/_facets

Reltio recommends that you pass the parameters through the request body.

Note: For interaction objects, you can perform the same facet search request by using the following request: POST {{api_uri}}/{{tenant}}/interactions/_facets.
Table 1. Parameters
Parameter Required Description
Headers Authorization Yes Information about authentication access token in format "Bearer <accessToken>" (see details in Authentication API).
Query filter No Enables entities filtering by a condition. Format for filter query parameter: filter=({Condition Type}[AND/OR {Condition Type}]*) For more information see Filtering Entities.
options No

This is comma-separated list of different options. Available option is searchByOv: search and sort by all attributes with ov only; disabled by default.

Example: options=searchByOv

activeness No

Available options:

  • active: allows search among active entities.
  • all: allows search among all (active/expired) entities.
  • not_active: allows search among expired entities.

Example: activeness=active

Body Indicates a JSON array of facet request specifications or a JSON object with facets fields. The same fields are supported as query parameters as well.
Note: The query parameters have priority and override the body parameters.
Example: JSON array of facet request specifications
[
 {
   "fieldName" : "type"
 },
 {
   "fieldName" : "attributes.Education.GPA",
   "orderType" : "reversedCount",
   "pageSize" : 3,
   "pageNo" : 2,
   "includeFilter" : [ "2.1", "5.1", "3.3" ]
 }
 ]
Example: JSON object
{
  "filter": "(equals(type,'configuration/entityTypes/Organization'))",
  "activeness": "active",
  "options": "sortByOV,ovOnly",
  "facets": [
    {
      "fieldName": "type"
    },
    {
      "fieldName": "attributes.Education.GPA",
      "orderType": "reversedCount",
      "pageSize": 3,
      "pageNo": 2,
      "includeFilter": [
        "2.1",
        "5.1",
        "3.3"
      ]
    }
  ]
}
Table 2. Facet Request Specification Parameters
Parameter Value Value type
fieldName Facet attribute (same as "facet" in basic facet request) string
orderType Sorting type: Could be "term", "count", "reversedTerm" and "reversedCount", sorting by facet term or facet count ENUM
pageSize Size of page in result integer
pageNo Number of page to return integer
includeFilter JSON array of strings (terms to return) array of strings
Note: To protect the Search service from resource exhaustion, limits are imposed in the Multiple Faceted Search requests. If the combination of pageSize and pageNo exceed 3,333 terms, then an error is returned. In such cases, the request must be adjusted to not exceed the limit. (In practice, it is not anticipated that real world applications may reach this limit.) For example, if pageSize is 100, then pageNo must not exceed 33 as pageNo 34 requires terms 3,300 to 3,399 to be returned, which exceeds the 3,333-term limit.

Response

JSON array with facet terms and counts.

Request - Find Individual Entities

POST {
	TenantURL
}
/entities/_facets ? filter = (equals(type, 'configuration/entityTypes/Individual')) Headers: Authorization: Bearer 204938 ca-2 cf7-44 b0-b11a-1 b4c59984512[{
	"fieldName": "type"
}, {
	"fieldName": "attributes.Education.GPA",
	"orderType": "reversedCount",
	"pageSize": 3,
	"pageNo": 2,
	"includeFilter": ["2.1", "5.1", "3.3"]
}, {
	"fieldName": "attributes.FirstName",
	"orderType": "term",
	"pageSize": 10,
	"pageNo": 1
}]

Response

{
	"type": {
		"individual": 222,
		"organization": 333,
		"location": 444
	},
	"attributes.Education.GPA": {
		"2.1": 1,
		"2.2": 2,
		"3.3": 5,
		"5.1": 7
	},
	"attributes.FirstName: : {
		"John " : 17,
		"Peter " : 32,
		"Alex " : 6
	}}