One saved elastic search query definition, typically loaded from a ".query.json" file in an account's or app's query repository. Holds the raw query JSON, the search indexes it runs against, the roles allowed to run it, and optionally the QueryBuilderBean used to edit it through the visual query builder UI.
Properties
| Property | Returns | Description |
|---|---|---|
| indexes | List<String> | The ids of the search indexes this query runs against. |
| name | String | The identifier used to look up this query, derived from its source file name with the ".query.json" suffix removed. |
| query | String | The raw elastic search query, as a JSON string. |
| queryBuilder | QueryBuilderBean | The visual query builder configuration used to edit this query, if it was built or last edited through the query builder UI rather than hand written. |
| roles | List<String> | The names of the roles allowed to run this query. |
| sourceFileName | String | The name of the file this query was loaded from, for example "reward-entries.query.json". |
Methods
getIndexes()
Returns: List<String>
The ids of the search indexes this query runs against.
getQuery()
Returns: String
The raw elastic search query, as a JSON string.
getRoles()
Returns: List<String>
The names of the roles allowed to run this query.
getSourceFileName()
Returns: String
The name of the file this query was loaded from, for example "reward-entries.query.json".
getName()
Returns: String
The identifier used to look up this query, derived from its source file name with the ".query.json" suffix removed.
getQueryBuilder()
Returns: QueryBuilderBean
The visual query builder configuration used to edit this query, if it was built or last edited through the query builder UI rather than hand written.
duplicate()
Returns: QueryBean
Creates a deep copy of this query, including a duplicate of its query builder configuration. Used before mutating a query that may be shared with a cached Queries instance.