You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/guides/55-performance/03-fulltext-index.md
+26-18Lines changed: 26 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,6 @@ REFRESH INVERTED INDEX customer_feedback_idx ON customer_feedback;
62
62
63
63
Databend offers a range of full-text search functions empowering you to efficiently search through documents. For more information about their syntax and examples, see [Full-Text Search Functions](/sql/sql-functions/search-functions/).
|`<columns>`| A comma-separated list of column names in the table to search for the specified keywords, with optional weighting using the syntax (^), which allows assigning different weights to each column, influencing the importance of each column in the search. |
23
-
|`<keywords>`| The keywords to match against the specified columns in the table. |
23
+
|`<keywords>`| The keywords to match against the specified columns in the table. This parameter can also be used for suffix matching, where the search term followed by an asterisk (*) can match any number of characters or words. |
24
+
|`<options>`| A set of configuration options, separated by semicolons `;`, that customize the search behavior. See the table below for details. |
| fuzziness | Allows matching terms within a specified Levenshtein distance. `fuzziness` can be set to 1 or 2. | SELECT id, score(), content FROM t WHERE match(content, 'box', 'fuzziness=1'); | When matching the query term "box", `fuzziness=1` allows matching terms like "fox", since "box" and "fox" have a Levenshtein distance of 1. |
29
+
| operator | Specifies how multiple query terms are combined. Can be set to OR (default) or AND. OR returns results containing any of the query terms, while AND returns results containing all query terms. | SELECT id, score(), content FROM t WHERE match(content, 'action works', 'fuzziness=1;operator=AND'); | With `operator=AND`, the query requires both "action" and "works" to be present in the results. Due to `fuzziness=1`, it matches terms like "Actions" and "words", so "Actions speak louder than words" is returned. |
30
+
| lenient | Controls whether errors are reported when the query text is invalid. Defaults to `false`. If set to `true`, no error is reported, and an empty result set is returned if the query text is invalid. | SELECT id, score(), content FROM t WHERE match(content, '()', 'lenient=true'); | If the query text `()` is invalid, setting `lenient=true` prevents an error from being thrown and returns an empty result set instead. |
24
31
25
32
## Examples
26
33
@@ -46,6 +53,20 @@ SELECT * FROM test WHERE MATCH('title', 'art power');
46
53
│ The Art of Communication │ Effective communication is crucial in everyday life. │
0 commit comments