Accelerate the Value of Data

Relations Filtering

When a filter parameter is supported in an operation (for example, relation search), it enables filtering relations by a condition.

Format

Format for the filter query parameter: filter=({Condition Type}[AND/OR {Condition Type}]*)
Note: Irrespective of the value that you enter in the filter={Condition Type}(property, value) condition, the search engine considers only the first 256 symbols of the entered value and ignores the rest.
Table 1. Supported Filter Condition Types
Filter Description of Condition Types Example
equals equals(property, value): This condition type filters relationships based on the exact match condition by ignoring the case of the conditional values. This condition type is used in the Search relation events with cursor operation. Examples:
  • Filter by start entity: filter=(equals(startObject,'entities/1'))
  • Return relations of an entity: filter=(equals(startObject,'entities/1') or equals(endObject,'entities/1'))

Examples for the Search relation events with cursor operation:

  • Filter the relationship type: filter=(equals(type,'configuration/relationTypes/Spouse'))
  • For relationship events by URI: filter=(equals(relation_uri, '005ZBhp')
  • Filter relationship events by relation_type: filter=(equals(relation_type, 'HasAddress')
equalsCaseSensitive equalsCaseSensitive(property, value): This condition type filters relationships based on the exact match condition by considering the case of the conditional values. Filter by the Commenters attribute with the value as ‘John’ (case sensitive): filter=equalsCaseSensitive(attributes.Commenters, ‘John’)
containsWordStartingWith containsWordStartingWith(property, tokenized value): This is a prefixed condition type and returns relationships that have the conditional property starting with the conditional value. Filter by the Title attribute containing a word starting with ‘Present’: filter=containsWordStartingWith(attributes.Title, Present)
startsWith startsWith(property, stricted value): This is a prefixed condition type and returns relationships that have the condition property starting with the conditional value. Filter by the Commenters attribute starting with ‘Pitt’: filter=startsWith(attributes.Commenters, 'Pitt')
fullText fullText(property, value): This condition type combines individual results into the overall result and returns relationships that have the conditional property with the conditional value (any place). Full text search across all the Commenters attributes: filter=fullText(attributes.Commenters, 'Mike')
fuzzy fuzzy(property, value): This condition type filters relations based on the fuzzy match condition. The condition permits minor differences between the query and target strings. Fuzzy search logic can be applied to any string attribute Search.

For more information, see Fuzzy Filtering.

Filter by Details for name Smith:

fuzzy(attributes.Details,'Smith')

missing missing(property): This condition type returns relationships with fields that have no values for property or the property value is empty. Filter relationships that do not have the Title attribute or have empty value for this attribute: filter=missing(attributes.Title)
exists exist(property): This condition type returns relationships having non-empty value for property. Filter relationships that have non-empty value for the Title attribute: filter=exists(attributes.Title)
range range(property, start, end): This condition type indicates that the property is between (including edges, ignoring case) the specified start and end values. Filter relationships with Rank between '1' and '5': filter=range(attributes.Rank, 1, 5)
lte lte(property, value): This condition type indicates the lesser than or equals conditions. Examples:
  • Filter relationships with Rank lesser than or equal to 10: filter=lte(attributes.Rank, 10)
  • Filter historical events with a timestamp lesser than or equal to a specified value: filter=lte(timestamp, '1428309071535')
gte gte(property, value): This condition type indicates the greater than or equals conditions. Examples:
  • Filter relationships with Rank greater than or equal to 20: filter=gte(attributes.Rank, 20)
  • Filter historical events with a timestamp greater than or equal to a specified value: filter=gte(timestamp, '1428309071535')
lt lt(property, value): This condition type indicates the lesser than condition. Examples:
  • Filter relationships created earlier than '1540805153527': filter=lt(createdTime, 1540805153527)
  • Filter historical events with a timestamp lesser than a specified value: filter=lt(timestamp, '1428309071535')
gt gt(property, value): This condition type indicates the greater than condition. Examples:
  • Filter relationships updated later than '1540805153527': filter=gt(updatedTime, 1540805153527)
  • Filter historical events with a timestamp greater than a specified value: filter=gt(timestamp, '1428309071535')
contains contains(property, *value or ?value): This condition type is passed if property satisfies a wildcard record. The supported wildcards are as follows:
  • * - Matches any character sequence (including the empty one)
  • ? - Matches any single character (not case sensitive)
Filter by a specific attribute: filter=contains(attributes.Commenters, '*Johnson*')
in in(property, value): The value must contain a comma-separated value for the in filter clause. Filter relationships with Commenters Janaki or Titilayo: filter=in(attributes.Commenters, "Janaki,Titilayo")
listEquals This condition type has the following variants:
  • listEquals(property, file URL) - This condition type returns relationships that have a conditional property with conditional values from the file (one value in each row). This condition type returns an empty result if the file is unavailable or is deleted. The supported file formats are TXT and CSV. You can specify a file with public access in the filter or can upload a file to Reltio bucket. For more information, see Uploading a File for File-based Search.
    Note: The CSV format for file-based search is supported provided:
    • It has a single column.
    • The input CSV must not have a header row.
    The input file can contain a maximum of 5000 rows only. The maximum file size is 10 MB.
  • listEquals(property, value, value) - This condition type is passed if the conditional property is equal to one of the comma-separated values.
Note: The case of the values is not considered when filtering using any of the variants. Therefore, filtering for both these variants is not case sensitive.
Example of the two variants:
  • Find all relationships having a value from a public file: filter=listEquals(attributes.Title, 'URL:https://reltio.com/example.txt')
  • Find all relationships having a value from uploaded to Reltio bucket file: filter=listEquals(attributes.Title,'URL:s3://reltio-search-data/test/valueListFiles/06-Sep-2021/tenantId/data104359926.csv')
  • Find all relationships having a value from a list: filter=listEquals(attributes.Commenters, Steve, Peter, John)
listEqualsCaseSensitive This condition type has the following variants:
  • listEqualsCaseSensitive(property, file URL) - This condition type returns relationships that have a conditional property with conditional values from the file (one value in each row). This condition type returns an empty result if the file is unavailable or is deleted. The supported file formats are TXT and CSV. You can specify a file with public access in the filter or can upload a file to Reltio bucket. For more information, see Uploading a File for File-based Search.
    Note: The CSV format for file-based search is supported provided:
    • It has a single column.
    • The input CSV must not have a header row.
    The input file can contain a maximum of 5000 rows only.
  • listEqualsCaseSensitive(property, value, value) - This condition type is passed if the conditional property is equal to one of the comma-separated values.
Note: The case of the values is considered when filtering using any of the variants. Therefore, filtering for both these variants is case sensitive.
Example of the two variants:
  • Find all relationships having a value from a file:

    filter=listEqualsCaseSensitive(attributes.Title,'URL:s3://reltio-search-data/test/valueListFiles/06-Sep-2021/tenantId/data104359926.csv')

  • Find all relationships having a value from a list:

    filter=listEqualsCaseSensitive(attributes.Commenters, Steve, Peter)

not This operator negates a condition and can be used with other operators. Filter all entities with the Title attribute that does not start with New: filter=not(startsWith(attributes.Title, 'New'))
Note:
  • In a condition type expression, property is a dot-delimited path to the property to be searched with. For example: type, attributes.Title, startObject.
    • For the "Search relation events with cursor" operation, available fields and values for search: timestamp, type, relation_uri
    • Type can have the following values: C (created), U (updated), D (deleted).
  • Search by multiple conditions is supported with the AND and OR operands. Following are some examples:
    • Find active relationships by '2005-10-17': filter=(gt(activeness.startDate, 1129507200) and lt(activeness.endDate,1129507200)
    • Filtering relationship events by event timestamp: filter=(gt(timestamp, 1373288685810) and lt(timestamp,1373288903390))
  • Search is not case sensitive except for the equalsCaseSensitive and listEqualsCaseSensitive conditions.