Skip to content

Search Models Documentation

This document provides detailed information about the search models used to enable various search functionalities. These models are designed to give users the flexibility to search in different ways.

The NumericSearch model is used to perform searches on numeric fields. It supports the following operations:

  • eq: Equal to. Finds items where the numeric field is equal to the specified value.
  • neq: Not equal to. Finds items where the numeric field is not equal to the specified value.
  • in: In. Finds items where the numeric field is in the specified list of values.
  • notIn: Not in. Finds items where the numeric field is not in the specified list of values.
  • gt: Greater than. Finds items where the numeric field is greater than the specified value.
  • gte: Greater than or equal to. Finds items where the numeric field is greater than or equal to the specified value.
  • lt: Less than. Finds items where the numeric field is less than the specified value.
  • lte: Less than or equal to. Finds items where the numeric field is less than or equal to the specified value.
  • blank: Is blank. Finds items where the numeric field is null or missing.
  • notblank: Is not blank. Finds items where the numeric field is not null or missing.

The IdentifierSearch model is a generic type used to perform searches on identifier fields. It supports the following operations:

  • eq: Equal to. Finds items where the identifier field is equal to the specified value.
  • neq: Not equal to. Finds items where the identifier field is not equal to the specified value.
  • in: In. Finds items where the identifier field is in the specified list of values.
  • notIn: Not in. Finds items where the identifier field is not in the specified list of values.

The StringSearch model is used to perform searches on string fields. It supports the following operations:

  • eq: Equal to. Finds items where the string field is exactly equal to the specified value.
  • neq: Not equal to. Finds items where the string field is not exactly equal to the specified value.
  • in: In. Finds items where the string field is in the specified list of values.
  • notIn: Not in. Finds items where the string field is not in the specified list of values.
  • contains: Contains. Finds items where the string field contains the specified substring.
  • notContains: Not contains. Finds items where the string field does not contain the specified substring.
  • startsWith: Starts with. Finds items where the string field starts with the specified substring.
  • endsWith: Ends with. Finds items where the string field ends with the specified substring.
  • blank: Is blank. Finds items where the string field is empty or missing.
  • notblank: Is not blank. Finds items where the string field is not empty or missing.

The DateSearch model is used to perform searches on date/time fields. It supports the following operations:

  • eq: Equal to. Finds items where the date/time field is equal to the specified datetime value.
  • neq: Not equal to. Finds items where the date/time field is not equal to the specified datetime value.
  • in: In. Finds items where the date/time field is in the specified list of datetime values.
  • notIn: Not in. Finds items where the date/time field is not in the specified list of datetime values.
  • gt: Greater than. Finds items where the date/time field is later than the specified datetime value.
  • gte: Greater than or equal to. Finds items where the date/time field is later than or equal to the specified datetime value.
  • lt: Less than. Finds items where the date/time field is earlier than the specified datetime value.
  • lte: Less than or equal to. Finds items where the date/time field is earlier than or equal to the specified datetime value.
  • blank: Is blank. Finds items where the date/time field is null or missing.
  • notblank: Is not blank. Finds items where the date/time field is not null or missing.


Sample JSON Payload

Below is a sample JSON payload demonstrating how to use the NumericSearch and StringSearch models in a query. The first property uses the eq (equal) operation from NumericSearch, and the second property uses the contains operation from StringSearch.

{
  "numericField": {
    "eq": 42
  },
  "stringField": {
    "contains": "sample"
  }
}

Note on Combining Operations When multiple operations are used within the same property, they are combined using an "AND" clause. This means that for an item to match the search criteria, it must satisfy all the conditions specified within that property.

For example, if you add another condition to stringField like "eq": "example", the item must contain "sample" in stringField AND must exactly match "example".

{
  "stringField": {
    "contains": "sample",
    "eq": "example"
  }
}
In this case, stringField must meet both conditions for an item to be considered a match.