Class SearchRequest.Builder
- All Implemented Interfaces:
SearchRequest._FinalStage,SearchRequest.QueryStage
- Enclosing class:
SearchRequest
-
Method Summary
Modifier and TypeMethodDescriptionadditionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) build()Restrict results to content associated with this client — the Vectros-assigned UUID of a client in your account.Restrict results to content associated with this client — the Vectros-assigned UUID of a client in your account.contentTypes(List<SearchRequestContentTypesItem> contentTypes) Narrow results to specific content types.contentTypes(Optional<List<SearchRequestContentTypesItem>> contentTypes) Narrow results to specific content types.createdAfter(String createdAfter) Restrict results to content created at or after this ISO-8601 UTC timestamp.createdAfter(Optional<String> createdAfter) Restrict results to content created at or after this ISO-8601 UTC timestamp.createdBefore(String createdBefore) Restrict results to content created at or before this ISO-8601 UTC timestamp.createdBefore(Optional<String> createdBefore) Restrict results to content created at or before this ISO-8601 UTC timestamp.filters(Map<String, FilterValue> filters) Field-level filters applied to your document and record metadata.filters(Optional<Map<String, FilterValue>> filters) Field-level filters applied to your document and record metadata.Restrict results to content (documents or records) in this EXACT folder.Restrict results to content (documents or records) in this EXACT folder.from(SearchRequest other) The maximum number of results to return.The maximum number of results to return.minSimilarity(Double minSimilarity) The minimum semantic similarity score a result must have to be included, on a scale of 0.0 to 1.0.minSimilarity(Optional<Double> minSimilarity) The minimum semantic similarity score a result must have to be included, on a scale of 0.0 to 1.0.minTextRelevance(Double minTextRelevance) A relative relevance floor for the keyword leg, given as a fraction from 0 to 1 of the TOP result's score — results scoring below (top score × this value) are dropped.minTextRelevance(Optional<Double> minTextRelevance) A relative relevance floor for the keyword leg, given as a fraction from 0 to 1 of the TOP result's score — results scoring below (top score × this value) are dropped.mode(SearchRequestMode mode) How results are ranked.mode(Optional<SearchRequestMode> mode) How results are ranked.The number of results to skip, for pagination.The number of results to skip, for pagination.Restrict results to content belonging to this organization — the Vectros-assigned UUID of an organization in your account.Restrict results to content belonging to this organization — the Vectros-assigned UUID of an organization in your account.The search query, expressed in natural language or as keywords.requireComplete(Boolean requireComplete) A fail-closed override.requireComplete(Optional<Boolean> requireComplete) A fail-closed override.rootFolderId(String rootFolderId) Restrict results to content (documents or records) anywhere under this folder subtree — the folder itself and all of its descendants.rootFolderId(Optional<String> rootFolderId) Restrict results to content (documents or records) anywhere under this folder subtree — the folder itself and all of its descendants.The phrase-match slop: the number of intervening positions allowed between query terms whentextModeis PHRASE (0 means the terms must be exactly adjacent).The phrase-match slop: the number of intervening positions allowed between query terms whentextModeis PHRASE (0 means the terms must be exactly adjacent).textMode(SearchRequestTextMode textMode) How query terms are matched by the keyword engine when the mode is TEXT or HYBRID.textMode(Optional<SearchRequestTextMode> textMode) How query terms are matched by the keyword engine when the mode is TEXT or HYBRID.Restrict results to content of a specific schema type — for examplepatient,intake_form, orrunbook.Restrict results to content of a specific schema type — for examplepatient,intake_form, orrunbook.uniqueDocuments(Boolean uniqueDocuments) When true, returns at most one chunk per source item, so a single document or record cannot appear more than once in the results.uniqueDocuments(Optional<Boolean> uniqueDocuments) When true, returns at most one chunk per source item, so a single document or record cannot appear more than once in the results.Restrict results to content owned by this user — the Vectros-assigned UUID of a user in your account.Restrict results to content owned by this user — the Vectros-assigned UUID of a user in your account.
-
Method Details
-
from
- Specified by:
fromin interfaceSearchRequest.QueryStage
-
query
The search query, expressed in natural language or as keywords. Required.
The search query, expressed in natural language or as keywords. Required.
- Specified by:
queryin interfaceSearchRequest.QueryStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
requireComplete
A fail-closed override. When true, the request returns HTTP 503 instead of partial results if one of the search engines is unavailable. Defaults to false, in which case an outage degrades to the surviving engine and the response carries
degraded: truealong with the failed engines indegradedLegs. Set this to true only when complete results are required and a degraded answer is unacceptable.- Specified by:
requireCompletein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
requireComplete
A fail-closed override. When true, the request returns HTTP 503 instead of partial results if one of the search engines is unavailable. Defaults to false, in which case an outage degrades to the surviving engine and the response carries
degraded: truealong with the failed engines indegradedLegs. Set this to true only when complete results are required and a degraded answer is unacceptable.- Specified by:
requireCompletein interfaceSearchRequest._FinalStage
-
createdBefore
Restrict results to content created at or before this ISO-8601 UTC timestamp. Pair it with
createdAfterto define a window, or use it alone to find content older than a cutoff (for example, in archival or cleanup workflows).- Specified by:
createdBeforein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdBefore
Restrict results to content created at or before this ISO-8601 UTC timestamp. Pair it with
createdAfterto define a window, or use it alone to find content older than a cutoff (for example, in archival or cleanup workflows).- Specified by:
createdBeforein interfaceSearchRequest._FinalStage
-
createdAfter
Restrict results to content created at or after this ISO-8601 UTC timestamp. Useful for incremental queries (for example, finding anything ingested in the last hour), for isolating just-created content from older history, and for time-bounded analytics. Pair it with
createdBeforeto define a window.- Specified by:
createdAfterin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAfter
Restrict results to content created at or after this ISO-8601 UTC timestamp. Useful for incremental queries (for example, finding anything ingested in the last hour), for isolating just-created content from older history, and for time-bounded analytics. Pair it with
createdBeforeto define a window.- Specified by:
createdAfterin interfaceSearchRequest._FinalStage
-
typeName
Restrict results to content of a specific schema type — for example
patient,intake_form, orrunbook. Applies to both documents and records: any item whose bound schema type matches is kept. On its own it narrows both documents and records to that type; combine it withcontentTypesto narrow within a single content type — for examplecontentTypes: ["documents"]withtypeName: "runbook"searches only runbook documents. Untyped content (ingested without a schema) never matches atypeNamefilter.- Specified by:
typeNamein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
typeName
Restrict results to content of a specific schema type — for example
patient,intake_form, orrunbook. Applies to both documents and records: any item whose bound schema type matches is kept. On its own it narrows both documents and records to that type; combine it withcontentTypesto narrow within a single content type — for examplecontentTypes: ["documents"]withtypeName: "runbook"searches only runbook documents. Untyped content (ingested without a schema) never matches atypeNamefilter.- Specified by:
typeNamein interfaceSearchRequest._FinalStage
-
rootFolderId
Restrict results to content (documents or records) anywhere under this folder subtree — the folder itself and all of its descendants. Provide the Vectros-assigned UUID of a top-level (root) folder. Applies to documents and records alike. Use
folderIdinstead to match a single exact folder.- Specified by:
rootFolderIdin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
rootFolderId
Restrict results to content (documents or records) anywhere under this folder subtree — the folder itself and all of its descendants. Provide the Vectros-assigned UUID of a top-level (root) folder. Applies to documents and records alike. Use
folderIdinstead to match a single exact folder.- Specified by:
rootFolderIdin interfaceSearchRequest._FinalStage
-
folderId
Restrict results to content (documents or records) in this EXACT folder. Folders hold a mix of documents and records. Provide the Vectros-assigned UUID of a folder; use
GET /v1/foldersto list your folders. To match a folder AND all of its descendants, userootFolderIdinstead.- Specified by:
folderIdin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
folderId
Restrict results to content (documents or records) in this EXACT folder. Folders hold a mix of documents and records. Provide the Vectros-assigned UUID of a folder; use
GET /v1/foldersto list your folders. To match a folder AND all of its descendants, userootFolderIdinstead.- Specified by:
folderIdin interfaceSearchRequest._FinalStage
-
contentTypes
Narrow results to specific content types. When omitted, empty, or set to both values, the search returns all content (documents and records) in a single unified result set, which is the default behavior. Each returned result carries a
sourceTypediscriminator so you can tell documents and records apart. Pass["documents"]for documents only, or["records"]for records only.- Specified by:
contentTypesin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
contentTypes
public SearchRequest._FinalStage contentTypes(Optional<List<SearchRequestContentTypesItem>> contentTypes) Narrow results to specific content types. When omitted, empty, or set to both values, the search returns all content (documents and records) in a single unified result set, which is the default behavior. Each returned result carries a
sourceTypediscriminator so you can tell documents and records apart. Pass["documents"]for documents only, or["records"]for records only.- Specified by:
contentTypesin interfaceSearchRequest._FinalStage
-
uniqueDocuments
When true, returns at most one chunk per source item, so a single document or record cannot appear more than once in the results.
- Specified by:
uniqueDocumentsin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
uniqueDocuments
When true, returns at most one chunk per source item, so a single document or record cannot appear more than once in the results.
- Specified by:
uniqueDocumentsin interfaceSearchRequest._FinalStage
-
slop
The phrase-match slop: the number of intervening positions allowed between query terms when
textModeis PHRASE (0 means the terms must be exactly adjacent). Ignored for the other text modes.- Specified by:
slopin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
slop
The phrase-match slop: the number of intervening positions allowed between query terms when
textModeis PHRASE (0 means the terms must be exactly adjacent). Ignored for the other text modes.- Specified by:
slopin interfaceSearchRequest._FinalStage
-
minTextRelevance
A relative relevance floor for the keyword leg, given as a fraction from 0 to 1 of the TOP result's score — results scoring below (top score × this value) are dropped. Keyword scores are unbounded and depend on the query, so this is a relative cutoff rather than an absolute score: for example, 0.5 keeps only results at least half as relevant as the best hit. Applies when the mode is TEXT or HYBRID. Omit it (or use a value of 0 or less) to keep all keyword matches.
- Specified by:
minTextRelevancein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
minTextRelevance
A relative relevance floor for the keyword leg, given as a fraction from 0 to 1 of the TOP result's score — results scoring below (top score × this value) are dropped. Keyword scores are unbounded and depend on the query, so this is a relative cutoff rather than an absolute score: for example, 0.5 keeps only results at least half as relevant as the best hit. Applies when the mode is TEXT or HYBRID. Omit it (or use a value of 0 or less) to keep all keyword matches.
- Specified by:
minTextRelevancein interfaceSearchRequest._FinalStage
-
minSimilarity
The minimum semantic similarity score a result must have to be included, on a scale of 0.0 to 1.0. Results scoring below this threshold are dropped. Applies when the mode is SEMANTIC or HYBRID.
- Specified by:
minSimilarityin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
minSimilarity
The minimum semantic similarity score a result must have to be included, on a scale of 0.0 to 1.0. Results scoring below this threshold are dropped. Applies when the mode is SEMANTIC or HYBRID.
- Specified by:
minSimilarityin interfaceSearchRequest._FinalStage
-
textMode
How query terms are matched by the keyword engine when the mode is TEXT or HYBRID. OR matches content containing any query term (broadest recall). AND requires every term to be present (higher precision). PHRASE requires the terms to appear as a contiguous sequence. COMPLEX enables the full query syntax, including boolean operators, field-scoped queries, and range filters. When omitted, defaults to PHRASE (with a slop of 3) in HYBRID mode and OR in TEXT mode.
- Specified by:
textModein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
textMode
How query terms are matched by the keyword engine when the mode is TEXT or HYBRID. OR matches content containing any query term (broadest recall). AND requires every term to be present (higher precision). PHRASE requires the terms to appear as a contiguous sequence. COMPLEX enables the full query syntax, including boolean operators, field-scoped queries, and range filters. When omitted, defaults to PHRASE (with a slop of 3) in HYBRID mode and OR in TEXT mode.
- Specified by:
textModein interfaceSearchRequest._FinalStage
-
filters
Field-level filters applied to your document and record metadata. Each key is a field name, and top-level keys are AND-combined. Each value is one of: a scalar (string, number, or boolean) for an exact match; an array of scalars to match any one of them; or an operator map for ranges, negation, and membership. The supported operators are a closed set:
$eq,$ne,$gt,$gte,$lt,$lte(each takes a scalar) and$in,$nin(each takes an array of scalars). Operators within one map are AND-combined, so{"price":{"$gte":100,"$lte":500}}expresses a closed range;$inand$ninmay not be combined with other operators. Numbers and booleans are matched by type, so the field must have been ingested under a typed schema; dates may be sent as ISO 8601 strings or epoch milliseconds. Unknown operators, non-scalar operands, and malformed field names are rejected with a 400.- Specified by:
filtersin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
filters
Field-level filters applied to your document and record metadata. Each key is a field name, and top-level keys are AND-combined. Each value is one of: a scalar (string, number, or boolean) for an exact match; an array of scalars to match any one of them; or an operator map for ranges, negation, and membership. The supported operators are a closed set:
$eq,$ne,$gt,$gte,$lt,$lte(each takes a scalar) and$in,$nin(each takes an array of scalars). Operators within one map are AND-combined, so{"price":{"$gte":100,"$lte":500}}expresses a closed range;$inand$ninmay not be combined with other operators. Numbers and booleans are matched by type, so the field must have been ingested under a typed schema; dates may be sent as ISO 8601 strings or epoch milliseconds. Unknown operators, non-scalar operands, and malformed field names are rejected with a 400.- Specified by:
filtersin interfaceSearchRequest._FinalStage
-
clientId
Restrict results to content associated with this client — the Vectros-assigned UUID of a client in your account. Use
GET /v1/clients?externalId=to look up a client's ID from your own identifier.- Specified by:
clientIdin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
clientId
Restrict results to content associated with this client — the Vectros-assigned UUID of a client in your account. Use
GET /v1/clients?externalId=to look up a client's ID from your own identifier.- Specified by:
clientIdin interfaceSearchRequest._FinalStage
-
orgId
Restrict results to content belonging to this organization — the Vectros-assigned UUID of an organization in your account. Use
GET /v1/orgs?externalId=to look up an organization's ID from your own identifier.- Specified by:
orgIdin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
orgId
Restrict results to content belonging to this organization — the Vectros-assigned UUID of an organization in your account. Use
GET /v1/orgs?externalId=to look up an organization's ID from your own identifier.- Specified by:
orgIdin interfaceSearchRequest._FinalStage
-
userId
Restrict results to content owned by this user — the Vectros-assigned UUID of a user in your account. Use
GET /v1/users?externalId=to look up a user's ID from your own identifier.- Specified by:
userIdin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
userId
Restrict results to content owned by this user — the Vectros-assigned UUID of a user in your account. Use
GET /v1/users?externalId=to look up a user's ID from your own identifier.- Specified by:
userIdin interfaceSearchRequest._FinalStage
-
offset
The number of results to skip, for pagination. Must be between 0 and 200. Defaults to 0.
- Specified by:
offsetin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
offset
The number of results to skip, for pagination. Must be between 0 and 200. Defaults to 0.
- Specified by:
offsetin interfaceSearchRequest._FinalStage
-
limit
The maximum number of results to return. Must be between 1 and 100. Defaults to 20.
- Specified by:
limitin interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
limit
The maximum number of results to return. Must be between 1 and 100. Defaults to 20.
- Specified by:
limitin interfaceSearchRequest._FinalStage
-
mode
How results are ranked. HYBRID combines semantic and keyword ranking (recommended). SEMANTIC ranks by vector similarity only. TEXT ranks by keyword matching only. Defaults to HYBRID.
- Specified by:
modein interfaceSearchRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
mode
How results are ranked. HYBRID combines semantic and keyword ranking (recommended). SEMANTIC ranks by vector similarity only. TEXT ranks by keyword matching only. Defaults to HYBRID.
- Specified by:
modein interfaceSearchRequest._FinalStage
-
build
- Specified by:
buildin interfaceSearchRequest._FinalStage
-
additionalProperty
- Specified by:
additionalPropertyin interfaceSearchRequest._FinalStage
-
additionalProperties
- Specified by:
additionalPropertiesin interfaceSearchRequest._FinalStage
-