Skip to content

Commit

Permalink
Merge pull request #3008 from milvus-io/AnthonyTsu1984-patch-1
Browse files Browse the repository at this point in the history
Update basic-operators.md
  • Loading branch information
AnthonyTsu1984 authored Feb 5, 2025
2 parents 8b389b4 + e000244 commit 2f05541
Showing 1 changed file with 3 additions and 39 deletions.
42 changes: 3 additions & 39 deletions site/en/userGuide/search-query-get/boolean/basic-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,7 @@ Comparison operators are used to filter data based on equality, inequality, or s

- `<=` (Less than or equal to)​

### Example 1: Filtering with Equal To (`==`)​

Assume you have a field named `status` and you want to find all entities where `status` is "active". You can use the equality operator `==`:​

```python
filter = 'status == "active"'

```

### Example 2: Filtering with Not Equal To (`!=`)​

To find entities where `status` is not "inactive":​

```python
filter = 'status != "inactive"'

```

### Example 3: Filtering with Greater Than (`>`)​

If you want to find all entities with an `age` greater than 30:​

```python
filter = 'age > 30'

```

### Example 4: Filtering with Less Than (`<`)​

To find entities where `price` is less than 100:​

```python
filter = 'price < 100'

```

### Example 5: Filtering with Greater Than or Equal To (`>=`)​
### Example 1: Filtering with Greater Than or Equal To (`>=`)​

If you want to find all entities with `rating` greater than or equal to 4:​

Expand All @@ -71,7 +35,7 @@ filter = 'rating >= 4'​

```

### Example 6: Filtering with Less Than or Equal To (`<=`)​
### Example 2: Filtering with Less Than or Equal To (`<=`)​

To find entities with `discount` less than or equal to 10%:​

Expand Down Expand Up @@ -269,4 +233,4 @@ filter = 'history_temperatures[0] > 30'​

## Conclusion​

Milvus offers a range of basic operators that give you flexibility in filtering and querying your data. By combining comparison, range, arithmetic, and logical operators, you can create powerful filter expressions to narrow down your search results and retrieve the data you need efficiently.​
Milvus offers a range of basic operators that give you flexibility in filtering and querying your data. By combining comparison, range, arithmetic, and logical operators, you can create powerful filter expressions to narrow down your search results and retrieve the data you need efficiently.​

0 comments on commit 2f05541

Please sign in to comment.