Skip to content

Commit

Permalink
MOD-7009: Search and Query - Empty indexing (#199)
Browse files Browse the repository at this point in the history
* Initial docs for empty indexing

* Renaming empty indexing

---------

Co-authored-by: David Dougherty <david.dougherty@redis.com>
  • Loading branch information
raz-mon and dwdougherty committed Jun 17, 2024
1 parent 6c349be commit c8277b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 7 additions & 0 deletions content/commands/ft.create/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ arguments:
optional: true
token: WITHSUFFIXTRIE
type: pure-token
- name: indexempty
optional: true
token: INDEXEMPTY
type: pure-token
- arguments:
- name: sortable
token: SORTABLE
Expand Down Expand Up @@ -259,7 +263,10 @@ after the SCHEMA keyword, declares which fields to index:

- `WITHSUFFIXTRIE` for `TEXT` and `TAG` attributes, keeps a suffix trie with all terms which match the suffix. It is used to optimize `contains` (*foo*) and `suffix` (*foo) queries. Otherwise, a brute-force search on the trie is performed. If suffix trie exists for some fields, these queries will be disabled for other fields.

- `INDEXEMPTY` for `TEXT` and `TAG` attributes, allows you to index and search for empty strings. By default, empty strings are not indexed.

- `INDEXMISSING` for all field types, allows you to search for missing values, that is, documents that do not contain a specific field. Note the difference between a field with an empty value and a document with a missing value. By default, missing values are not indexed.

</details>

## Optional arguments
Expand Down
8 changes: 0 additions & 8 deletions content/develop/interact/search-and-query/query/combined.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,3 @@ FT.SEARCH idx:bikes_vss "(@price:[500 1000] @condition:{new})=>[KNN 3 @vector $q
```

The [vector search article]({{< relref "/develop/interact/search-and-query/query/vector-search" >}}) provides further details about vector queries in general.

## Missing values

You can use the `ismissing(@field)` query function to search for documents that do not contain a specific field (provided this field indexes missing values).

```
FT.SEARCH idx:bikes "ismissing(@price) @description:(kids | small)"
```

0 comments on commit c8277b1

Please sign in to comment.