Package com.mongodb.client.model.vault
Class TextOptions
java.lang.Object
com.mongodb.client.model.vault.TextOptions
Text options for a Queryable Encryption field that supports text queries.
Note: TextOptions is in Alpha and subject to backwards breaking changes.
- Since:
- 5.6
- MongoDB documentation
- queryable encryption
- Since server release
- 8.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaseSensitive(boolean caseSensitive) Set case sensitivitydiacriticSensitive(boolean diacriticSensitive) Set diacritic sensitivitybooleanbooleanorg.bson.BsonDocumentorg.bson.BsonDocumentorg.bson.BsonDocumentprefixOptions(org.bson.BsonDocument prefixOptions) Set the prefix options.substringOptions(org.bson.BsonDocument substringOptions) Set the substring options.suffixOptions(org.bson.BsonDocument suffixOptions) Set the suffix options.
-
Constructor Details
-
TextOptions
public TextOptions()Construct a new instance
-
-
Method Details
-
getCaseSensitive
public boolean getCaseSensitive()- Returns:
- true if text indexes for this field are case sensitive.
-
caseSensitive
Set case sensitivity- Parameters:
caseSensitive- true if text indexes are case sensitive- Returns:
- this
-
getDiacriticSensitive
public boolean getDiacriticSensitive()- Returns:
- true if text indexes are diacritic sensitive
-
diacriticSensitive
Set diacritic sensitivity- Parameters:
diacriticSensitive- true if text indexes are diacritic sensitive- Returns:
- this
-
prefixOptions
Set the prefix options.Expected to be a
BsonDocumentin the format of:{ // strMinQueryLength is the minimum allowed query length. Querying with a shorter string will error. strMinQueryLength: BsonInt32, // strMaxQueryLength is the maximum allowed query length. Querying with a longer string will error. strMaxQueryLength: BsonInt32 }- Parameters:
prefixOptions- the prefix options or null- Returns:
- this
-
getPrefixOptions
- Returns:
- the prefix options document or null
- See Also:
-
suffixOptions
Set the suffix options.Expected to be a
BsonDocumentin the format of:{ // strMinQueryLength is the minimum allowed query length. Querying with a shorter string will error. strMinQueryLength: BsonInt32, // strMaxQueryLength is the maximum allowed query length. Querying with a longer string will error. strMaxQueryLength: BsonInt32 }- Parameters:
suffixOptions- the suffix options or null- Returns:
- this
-
getSuffixOptions
- Returns:
- the suffix options document or null
- See Also:
-
substringOptions
Set the substring options.Expected to be a
BsonDocumentin the format of:{ // strMaxLength is the maximum allowed length to insert. Inserting longer strings will error. strMaxLength: BsonInt32, // strMinQueryLength is the minimum allowed query length. Querying with a shorter string will error. strMinQueryLength: BsonInt32, // strMaxQueryLength is the maximum allowed query length. Querying with a longer string will error. strMaxQueryLength: BsonInt32 }- Parameters:
substringOptions- the substring options or null- Returns:
- this
-
getSubstringOptions
- Returns:
- the substring options document or null
- See Also:
-