Skip to content

Commit

Permalink
Document textContainsPhrase (#3907)
Browse files Browse the repository at this point in the history
Signed-off-by: Allan Clements <[email protected]>
(cherry picked from commit eef961a)
  • Loading branch information
criminosis authored and FlorianHockmann committed Aug 9, 2023
1 parent 0a8138f commit f8283f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/index-backend/text-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ 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.*
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
Expand Down

0 comments on commit f8283f6

Please sign in to comment.