The Open API specification for Synapse is now available for download!

Download Open API Spec

HybridClause

org.sagebionetworks.repo.model.search.dsl.HybridClause

One entry of hybrid.queries: any Query clause, plus the neural clause that is accepted only here. Each entry is scored independently and the per-clause scores are then normalized and combined by search_pipeline.

Field Type Description
neural MAP<STRING,NeuralFieldOptions>

A semantic (vector) clause. semantic_search is the only key accepted; any other key is rejected. At index time that field is added to each OpenSearch document if at least one column is flagged semantic. The single-key restriction keeps room for additional vector fields later. See neural query.

The key names a vector field of the document, not a column, and is not resolved against the index's columns.

When the index has no column flagged semantic, every neural clause is dropped from the query, along with the entries at the same positions of the search pipeline's weights and bounds, and the remaining clauses are scored as if the dropped clauses had never been sent. A query whose clauses are all neural is rejected in that case.

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.
query_string QueryStringQuery A query_string full-text clause — the full Lucene query syntax (column prefixes such as title: wind, AND/OR/NOT, grouping, ranges, ~ fuzziness, ^ boosts, /regex/). The operators have no precedence, so parenthesize any expression that mixes AND and OR. Every column named in query, fields and default_field is resolved against the index schema, and an unknown column is rejected. Inside query, a column name containing white space or one of + - ! ( ) : ^ [ ] " { } ~ * ? \ / must escape that character with a backslash (e.g. sample\ id: S-1); the all-columns prefix *: is not supported, and _exists_: takes a single column name.
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.