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

Download Open API Spec

NeuralFieldOptions

org.sagebionetworks.repo.model.search.dsl.NeuralFieldOptions

The per-field options of a neural clause — semantic (vector) matching. The platform embeds query_text with its own registered model, so the caller supplies text rather than a vector; a caller-supplied raw vector is not accepted because there would be no way to detect an embedding-space mismatch.

At most one of k, min_score, and max_distance may be set.

filter restricts the candidates of this clause, and is applied during the vector search rather than after it, so a selective filter still yields k results. Use it only when the semantic clause must draw from a narrower subset than the rest of the query: a narrowing meant for every clause belongs in hybrid.filter, which is combined with this filter rather than replacing it. Server-side access-control filters are AND-ed in here as well. Narrowing one clause also rescales it — each clause is normalized over its own returned candidates, so the best document within the subset takes the top normalized score however weak its absolute similarity.

Field Type Description
query_text STRING Required. The query text from which to generate vector embeddings.
k INTEGER Optional. The number of results returned by the k nearest neighbours search. Only one variable, either k, min_score, or max_distance, can be specified. If a variable is not specified, the default is k with a value of 10. A number in the range of 100 to 200 is recommended for datasets up to 10M documents; raising it beyond that increases latency without improving relevance.
min_score NUMBER Optional. The minimum score threshold for the search results. Only one variable, either k, min_score, or max_distance, can be specified. For more information, see radial search.
max_distance NUMBER Optional. The maximum distance threshold for the search results. Only one variable, either k, min_score, or max_distance, can be specified. For more information, see radial search.
filter 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.