Skip to content

Commit

Permalink
Replace composite index by two indexes for FTS (#394)
Browse files Browse the repository at this point in the history
Co-authored-by: Pratim <[email protected]>
  • Loading branch information
emmanuel-keller and timpratim authored Mar 7, 2024
1 parent 4a88de8 commit 89fbc89
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Your text field won't be "full text searchable" unless you define a [full-text
Depending on the use case, each field can be associated with a different analyser.

```surql
-- Defining a full-text index on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_idx ON book FIELDS title, content SEARCH ANALYZER
custom_analyzer BM25;
-- Defining two full-text indexes on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_title ON book FIELDS title SEARCH ANALYZER custom_analyzer BM25;
DEFINE INDEX book_content ON book FIELDS content SEARCH ANALYZER custom_analyzer BM25;
```

## The MATCHES Operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ To make a text field searchable, you need to set up a [full-text index](/docs/su
Depending on the use case, each field can be associated with a different analyser.

```surql
-- Defining a full-text index on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_idx ON book FIELDS title, content SEARCH ANALYZER
custom_analyzer BM25;
-- Defining two full-text indexes on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_title ON book FIELDS title SEARCH ANALYZER custom_analyzer BM25;
DEFINE INDEX book_content ON book FIELDS content SEARCH ANALYZER custom_analyzer BM25;
```

## The MATCHES Operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ To make a text field searchable, you need to set up a [full-text index](/docs/su
Depending on the use case, each field can be associated with a different analyser.

```surql
-- Defining a full-text index on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_idx ON book FIELDS title, content SEARCH ANALYZER
custom_analyzer BM25;
-- Defining two full-text indexes on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_title ON book FIELDS title SEARCH ANALYZER custom_analyzer BM25;
DEFINE INDEX book_content ON book FIELDS content SEARCH ANALYZER custom_analyzer BM25;
```

## The MATCHES Operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ To make a text field searchable, you need to set up a [full-text index](/docs/su
Depending on the use case, each field can be associated with a different analyser.

```surql
-- Defining a full-text index on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_idx ON book FIELDS title, content SEARCH ANALYZER
custom_analyzer BM25;
-- Defining two full-text indexes on the 'title' and 'content' field of the 'book' table
DEFINE INDEX book_title ON book FIELDS title SEARCH ANALYZER custom_analyzer BM25;
DEFINE INDEX book_content ON book FIELDS content SEARCH ANALYZER custom_analyzer BM25;
```

## The MATCHES Operator
Expand Down

0 comments on commit 89fbc89

Please sign in to comment.