Skip to content

Commit

Permalink
Merge pull request #2967 from milvus-io/webui
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
AnthonyTsu1984 authored Jan 6, 2025
2 parents c440314 + 4aaa5e4 commit c1329e4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 19 deletions.
51 changes: 41 additions & 10 deletions site/en/menuStructure/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -701,22 +701,59 @@
"order": 5,
"children": []
},
{
"label": "Filtering",
"id": "filtering",
"order":6,
"children": [
{
"label": "Filtering Explained",
"id": "boolean.md",
"order": 0,
"children": []
},
{
"label": "Basic Operators",
"id": "basic-operators.md",
"order": 1,
"children": []
},
{
"label": "Filtering Templating",
"id": "filtering-templating.md",
"order": 2,
"children": []
},
{
"label": "JSON Operators",
"id": "json-operators.md",
"order": 3,
"children": []
},
{
"label": "Array Operators",
"id": "array-operators.md",
"order": 4,
"children": []
}
]
},
{
"label": "Full Text Search",
"id": "full-text-search.md",
"order": 6,
"order": 7,
"children": []
},
{
"label": "Text Match",
"id": "keyword-match.md",
"order": 7,
"order": 8,
"children": []
},
{
"label": "Search Iterators",
"id": "with-iterators.md",
"order": 8,
"order": 9,
"children": []
},
{
Expand All @@ -725,16 +762,10 @@
"order": 9,
"children": []
},
{
"label": "Metadata Filtering",
"id": "boolean.md",
"order": 14,
"children": []
},
{
"label": "Reranking",
"id": "reranking.md",
"order": 15,
"order": 10,
"children": []
}
]
Expand Down
18 changes: 9 additions & 9 deletions site/en/userGuide/search-query-get/boolean/boolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Milvus supports several basic operators for filtering data:​

- **Range Filters**: `IN` and `LIKE` help match specific value ranges or sets.​

- **Arithmetic Operators**: `+`, `-`, `*`, `/`, `%`, and `**` are used for calculations involving numeric fields.​
- **Arithmetic Operators**: `+`, `-`, `*`, `/`, `%`, and `` are used for calculations involving numeric fields.​

- **Logical Operators**: `AND`, `OR`, and `NOT` or '&&', '||', '~', '!' combine multiple conditions into complex expressions.​

Expand Down Expand Up @@ -82,23 +82,23 @@ Milvus provides advanced filtering operators for specific data types, such as JS

Milvus offers advanced operators for querying JSON fields, enabling precise filtering within complex JSON structures:​

`**JSON_CONTAINS(identifier, jsonExpr)**`: Checks if a JSON expression exists in the field.​
`JSON_CONTAINS(identifier, jsonExpr)`: Checks if a JSON expression exists in the field.​

```python
# JSON data: {"tags": ["electronics", "sale", "new"]}​
filter='json_contains(tags, "sale")'

```

`**JSON_CONTAINS_ALL(identifier, jsonExpr)**`: Ensures all elements of the JSON expression are present.​
`JSON_CONTAINS_ALL(identifier, jsonExpr)`: Ensures all elements of the JSON expression are present.​

```python
# JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
filter='json_contains_all(tags, ["electronics", "sale", "new"])'

```

`**JSON_CONTAINS_ANY(identifier, jsonExpr)**`: Filters for entities where at least one element exists in the JSON expression.​
`JSON_CONTAINS_ANY(identifier, jsonExpr)`: Filters for entities where at least one element exists in the JSON expression.​

```python
# JSON data: {"tags": ["electronics", "sale", "new"]}​
Expand All @@ -112,28 +112,28 @@ For more details on JSON operators, refer to [​JSON Operators](json-operators.

Milvus provides advanced filtering operators for array fields, such as `ARRAY_CONTAINS`, `ARRAY_CONTAINS_ALL`, `ARRAY_CONTAINS_ANY`, and `ARRAY_LENGTH`, which allow fine-grained control over array data:​

`**ARRAY_CONTAINS**`: Filters entities containing a specific element.​
`ARRAY_CONTAINS`: Filters entities containing a specific element.​

```python
filter="ARRAY_CONTAINS(history_temperatures, 23)"

```

`**ARRAY_CONTAINS_ALL**`: Filters entities where all elements in a list are present.​
`ARRAY_CONTAINS_ALL`: Filters entities where all elements in a list are present.​

```python
filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"

```

`**ARRAY_CONTAINS_ANY**`: Filters entities containing any element from the list.​
`ARRAY_CONTAINS_ANY`: Filters entities containing any element from the list.​

```python
filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"

```

`**ARRAY_LENGTH**`: Filters based on the length of the array.​
`ARRAY_LENGTH`: Filters based on the length of the array.​

```python
filter="ARRAY_LENGTH(history_temperatures) < 10"
Expand All @@ -144,7 +144,7 @@ For more details on array operators, see [​ARRAY Operators](array-operators.md

### VARCHAR field-specific operators​

The `**Text_Match**` operator allows precise document retrieval based on specific query terms. It is particularly useful for filtered searches that combine scalar filters with vector similarity searches. Unlike semantic searches, Text Match focuses on exact term occurrences.​
The `Text_Match` operator allows precise document retrieval based on specific query terms. It is particularly useful for filtered searches that combine scalar filters with vector similarity searches. Unlike semantic searches, Text Match focuses on exact term occurrences.​

Milvus uses Tantivy to support inverted indexing and term-based text search. The process involves:​

Expand Down

0 comments on commit c1329e4

Please sign in to comment.