Skip to main content

SearchCriteria

Properties

NameTypeDescriptionNotes
Indices[]StringA list of indices to search within. Must contain exactly one item, typically ""entitlements"".[required]
Filtersmap[string]SearchCriteriaFiltersValueA map of filters applied to the search. Keys are filter names, and values are filter definitions.[optional]
QuerySearchCriteriaQuery[optional]
QueryTypeStringSpecifies the type of query. Must be ""TEXT"" if textQuery is used.[optional]
TextQuerySearchCriteriaTextQuery[optional]
IncludeNestedBooleanWhether to include nested objects in the search results.[optional] [default to $false]
Sort[]StringSpecifies the sorting order for the results.[optional]
SearchAfter[]StringUsed for pagination to fetch results after a specific point.[optional]

Examples

  • Prepare the resource
$SearchCriteria = Initialize-BetaSearchCriteria  -Indices [entitlements] `
-Filters {status={type=TERMS, terms=[active, inactive]}} `
-Query null `
-QueryType TEXT `
-TextQuery null `
-IncludeNested true `
-Sort [name:asc, createdAt:desc] `
-SearchAfter [12345, 67890]
  • Convert the resource to JSON
$SearchCriteria | ConvertTo-JSON

[Back to top]