Query
org.sagebionetworks.repo.model.search.dsl.Query
A single OpenSearch query DSL clause. Exactly one of the properties below may be set — the set property names the clause kind. See query vs. filter context and term-level vs. full-text queries.
The field-keyed leaf clauses (match, term, range, ...) are maps whose key is the column name and whose value is the per-field options object — only the long form is accepted (e.g. {"match":{"title":{"query":"x"}}}, not the {"match":{"title":"x"}} shorthand). The compound clauses (bool, dis_max, ...) nest further Query DSL clauses recursively.
| Field | Type | Description |
|---|---|---|
| match | MAP<STRING,MatchFieldOptions> | A match full-text clause. Map of column name to its match options. |
| match_phrase | MAP<STRING,MatchPhraseFieldOptions> | A match_phrase clause. Map of column name to its phrase options. |
| match_phrase_prefix | MAP<STRING,MatchPhrasePrefixFieldOptions> | A match_phrase_prefix clause. Map of column name to its options. |
| match_bool_prefix | MAP<STRING,MatchBoolPrefixFieldOptions> | A match_bool_prefix clause. Map of column name to its options. |
| term | MAP<STRING,TermFieldOptions> | A term term-level clause. Map of column name to its term options. |
| range | MAP<STRING,RangeFieldOptions> | A range term-level clause. Map of column name to its range bounds. |
| prefix | MAP<STRING,PrefixFieldOptions> | A prefix term-level clause. Map of column name to its prefix options. |
| wildcard | MAP<STRING,WildcardFieldOptions> | A wildcard term-level clause. Map of column name to its wildcard options. |
| fuzzy | MAP<STRING,FuzzyFieldOptions> | A fuzzy term-level clause. Map of column name to its fuzzy options. |
| terms | OBJECT | A terms term-level clause (matches any of several exact values). Field-keyed: {"terms":{"<column>":[v1, v2], "boost":1.0}}. The cross-index terms-lookup form is rejected. Carried as an opaque object because the field name is itself a key and the values are an array of polymorphic scalars; the same allowlist is enforced server-side. |
| exists | ExistsQuery | An exists term-level clause. Matches documents that have any non-null value for the given column. |
| multi_match | MultiMatchQuery | A multi_match full-text clause — a match run across several columns at once. |
| simple_query_string | SimpleQueryStringQuery | A simple_query_string full-text clause — a compact mini-DSL (+, |, -, ", *, ()) parsed leniently across the listed columns. |
| match_all | MatchAllQuery | A match_all clause. Matches every document. Use {"match_all":{}} to match all documents. |
| bool | BoolQuery | A bool compound clause — combines sub-clauses with boolean logic. |
| dis_max | DisMaxQuery | A dis_max compound clause. A document matches if any sub-clause matches; its score is the best single sub-clause score plus tie_breaker times the rest. |
| constant_score | ConstantScoreQuery | A constant_score compound clause. Wraps a filter and assigns every matching document the same score (boost). |
| boosting | BoostingQuery | A boosting compound clause. Returns documents matching positive, demoting those that also match negative by negative_boost. |