Package com.datastax.astra.client.model
Class FindOptions
java.lang.Object
com.datastax.astra.client.model.CommandOptions<FindOptions>
com.datastax.astra.client.model.FindOptions
List Options for a FindOne command.
-
Field Summary
Fields inherited from class com.datastax.astra.client.model.CommandOptions
embeddingAuthProvider, httpClientOptions, observers, token
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFluent api.Fluent api.limit
(int limit) Add a limit clause in the find blockUpdate page stateprojection
(Projection... projection) Syntax sugar as delete option is only a sortskip
(int skip) Add a skip clause in the find blockAdd a criteria with $vector in the sort clauseSyntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);Syntax sugar as delete option is only a sortAdd a criteria with $vectorize in the sort clause.Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);Methods inherited from class com.datastax.astra.client.model.CommandOptions
embeddingAPIKey, embeddingAuthProvider, getEmbeddingAuthProvider, getHttpClientOptions, getToken, httpClientOptions, registerObserver, registerObserver, token, unregisterObserver, unregisterObserver
-
Constructor Details
-
FindOptions
public FindOptions()Default constructor.
-
-
Method Details
-
sort
Syntax sugar as delete option is only a sort- Parameters:
sort
- add a filter- Returns:
- current command.
-
sort
Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);- Parameters:
rawSort
- raw sort clause- Returns:
- current command.
-
sort
Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);- Parameters:
sorClause
- sort clause as a document- Returns:
- current command.
-
sort
Add a criteria with $vectorize in the sort clause.- Parameters:
vectorize
- an expression to look for vectorizationsorts
- The sort criteria to be applied to the findOne operation.- Returns:
- current command
-
sort
Add a criteria with $vector in the sort clause- Parameters:
vector
- vector floatsorts
- The sort criteria to be applied to the findOne operation.- Returns:
- current command
-
projection
Syntax sugar as delete option is only a sort- Parameters:
projection
- add a filter- Returns:
- current command.
-
includeSimilarity
Fluent api.- Returns:
- add a filter
-
includeSortVector
Fluent api.- Returns:
- add a filter
-
pageState
Update page state- Parameters:
pageState
- new value for page state- Returns:
- self reference
-
skip
Add a skip clause in the find block- Parameters:
skip
- value for skip options- Returns:
- current command
-
limit
Add a limit clause in the find block- Parameters:
limit
- value for limit options- Returns:
- current command
-