From f8283f6fa4782196ec8bac56c922a6d3b75bcba6 Mon Sep 17 00:00:00 2001 From: Allan Clements Date: Tue, 8 Aug 2023 21:31:52 -0500 Subject: [PATCH] Document textContainsPhrase (#3907) Signed-off-by: Allan Clements (cherry picked from commit eef961ac66eebfcbd58129ac178dc759cd59b335) --- docs/index-backend/text-search.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index-backend/text-search.md b/docs/index-backend/text-search.md index f277ec7560..322c90141d 100644 --- a/docs/index-backend/text-search.md +++ b/docs/index-backend/text-search.md @@ -59,6 +59,7 @@ Full-text search is case-insensitive. - `textContainsFuzzy`: is true if (at least) one word inside the text string is similar to the query String (based on Levenshtein edit distance) +- `textContainsPhrase`: is true if the text string does contain the sequence of words in the query string ```groovy import static org.janusgraph.core.attribute.Text.* @@ -66,6 +67,7 @@ g.V().has('booksummary', textContains('unicorns')) g.V().has('booksummary', textContainsPrefix('uni')) g.V().has('booksummary', textContainsRegex('.*corn.*')) g.V().has('booksummary', textContainsFuzzy('unicorn')) +g.V().has('booksummary', textContainsPhrase('unicorn horn')) ``` The Elasticsearch backend extends this functionality and includes support for negations