FullTextContainsAny (NoSQL query)
APPLIES TO: NoSQL
Returns a boolean indicating whether any of the provided string expressions are contained in a specified property path.
Syntax
FullTextContainsAny(<property_path>, <string_expr1>, <string_expr2>, ...)
Arguments
Description | |
---|---|
property_path |
The property path to search. |
string_expr1 |
A string to find. |
string_expr1 |
A string to find. |
Return types
Returns a boolean expression.
Examples
This example returns all documents that contain either "keyword1" or "keyword2" in the path c.text
, projects the path, and returns only the TOP 10.
SELECT TOP 10 c.text
FROM c
WHERE FullTextContainsAny(c.text, "keywords1", "keywords2")
This example returns all documents that contain "keyword1", "keyword2", or "keyword3" in the path c.text
.
SELECT *
FROM c
WHERE FullTextContainsAny(c.text, "keyword1", "keyword2", "keyword3")
Remarks
- This function requires enrollment in the Azure Cosmos DB NoSQL Full Text Search preview feature
- This function benefits from a Full Text Index