Accelerate the Value of Data

Relations Filtering

Learn about filtering relations

Format

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

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
FilterDescription of Condition TypesExample
equalsequals(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')
equalsCaseSensitiveequalsCaseSensitive(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')
fuzzyfuzzy(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)
ltelte(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')
gtegte(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')
containscontains(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*')
inin(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")
listEqualsThis 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)
listEqualsCaseSensitiveThis 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)

notThis 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.

Search for Pinned or Ignored Relation attributes

Use the equals or missing filters to find Pinned or Ignored relation attributes.

You can filter to find any entities where:
  • Any relation attribute is Pinned or Ignored - Case 1
  • A defined relation attribute is Pinned or Ignored - Case 2
Note: By default, your search only includes simple relation attributes. If you want your search to include nested relation attributes,reindex your relations.
Case 1 - Search for any relation attribute
Example - search for all relations where, at least, one relation attribute is Pinned.
equals(attributes.pinned, "true")
Note: You can only use this filter with value="true", as in the example above. You'll get a bad request error for value="false". E.g., equals(attributes.pinned, "false").
Case 2 - Search for a defined relation attribute
Example - search for all relations where the simple relation attribute, Name, is pinned.
equals(attributes.Name.pinned, "true")
Example - search for all relations where simple relation attribute Summary, is not Ignored.
missing(attributes.Summary.ignored)
Example - search for all relations where the nested relation attribute, Identifiers.Type, is ignored.
equals(attributes.Identifiers.Type.ignored, "true")