String functions (Azure Cosmos DB)
APPLIES TO:
NoSQL
The string functions let you perform operations on strings in Azure Cosmos DB.
Functions
The below scalar functions perform an operation on a string input value and return a string, numeric, or Boolean value. The index usage column assumes, where applicable, that you're comparing the string system function to another value with an equality filter.
System function | Index usage | Index usage in queries with scalar aggregate functions | Remarks |
---|---|---|---|
CONCAT | Full scan | Full scan | |
CONTAINS | Full index scan | Full scan | |
ENDSWITH | Full index scan | Full scan | |
INDEX_OF | Full scan | Full scan | |
LEFT | Precise index scan | Precise index scan | |
LENGTH | Full scan | Full scan | |
LOWER | Full scan | Full scan | |
LTRIM | Full scan | Full scan | |
REGEXMATCH | Full index scan | Full scan | |
REPLACE | Full scan | Full scan | |
REPLICATE | Full scan | Full scan | |
REVERSE | Full scan | Full scan | |
RIGHT | Full scan | Full scan | |
RTRIM | Full scan | Full scan | |
STARTSWITH | Precise index scan | Precise index scan | Will be Expanded index scan if case-insensitive option is true. |
STRINGEQUALS | Index seek | Index seek | Will be Expanded index scan if case-insensitive option is true. |
StringToArray | Full scan | Full scan | |
StringToBoolean | Full scan | Full scan | |
StringToNull | Full scan | Full scan | |
StringToNumber | Full scan | Full scan | |
StringToObject | Full scan | Full scan | |
SUBSTRING | Full scan | Full scan | |
ToString | Full scan | Full scan | |
TRIM | Full scan | Full scan | |
UPPER | Full scan | Full scan |
Learn about about index usage in Azure Cosmos DB.
Next steps
Feedback
Submit and view feedback for