Searchcriteria
Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| Indices | []String | A list of indices to search within. Must contain exactly one item, typically ""entitlements"". | [required] |
| Filters | map[string]SearchcriteriaFiltersValue | A map of filters applied to the search. Keys are filter names, and values are filter definitions. | [optional] |
| Query | SearchcriteriaQuery | [optional] | |
| QueryType | String | Specifies the type of query. Must be ""TEXT"" if textQuery is used. | [optional] |
| TextQuery | SearchcriteriaTextQuery | [optional] | |
| IncludeNested | Boolean | Whether to include nested objects in the search results. | [optional] [default to $false] |
| Sort | []String | Specifies the sorting order for the results. | [optional] |
| SearchAfter | []String | Used for pagination to fetch results after a specific point. | [optional] |
Examples
- Prepare the resource
$Searchcriteria = Initialize-Searchcriteria -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