mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-01 08:58:31 +02:00
Merge pull request #1983 from abdonpijpelink/text_any
[v1.16.0] text_any filter condition docs
This commit is contained in:
@@ -319,6 +319,16 @@ If there is no full-text index for the field, the condition will work as exact s
|
||||
|
||||
If the query has several words, then the condition will be satisfied only if all of them are present in the text.
|
||||
|
||||
### Full Text Any
|
||||
|
||||
*Available as of v1.16.0*
|
||||
|
||||
The `text_any` full-text match condition is similar to the `text` condition, but with a key difference: while `text` only matches text fields that contain *all* the query terms, `text_any` matches fields that contain *any* of the query terms. In other words, even if a text field contains just one of the query terms, it is considered a match.
|
||||
|
||||
For example, a query for `good cheap` matches `cheap hardware` as well as `good performance`.
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/filter-condition/full-text-match-any/" >}}
|
||||
|
||||
### Phrase Match
|
||||
|
||||
*Available as of v1.15.0*
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
This code snippet sets up a field condition to search for one or more query terms within a text field. In this case, a special `text_any` match is defined with the target text being "good cheap". A text field is considered a match if it contains any of the search terms. The behavior may vary depending on the configuration of the full-text index for the field. If there is no full-text index configured for the field, the condition will work as an exact substring match.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
```csharp
|
||||
using static Qdrant.Client.Grpc.Conditions;
|
||||
|
||||
MatchTextAny("description", "good cheap");
|
||||
```
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
```go
|
||||
import "github.com/qdrant/go-client/qdrant"
|
||||
|
||||
qdrant.NewMatchTextAny("description", "good cheap")
|
||||
```
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
```java
|
||||
import static io.qdrant.client.ConditionFactory.matchTextAny;
|
||||
|
||||
matchTextAny("description", "good cheap");
|
||||
```
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
```json
|
||||
{
|
||||
"key": "description",
|
||||
"match": {
|
||||
"text_any": "good cheap"
|
||||
}
|
||||
}
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```python
|
||||
models.FieldCondition(
|
||||
key="description",
|
||||
match=models.MatchTextAny(text_any="good cheap"),
|
||||
)
|
||||
```
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::Condition;
|
||||
|
||||
Condition::matches_text_any("description", "good cheap")
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```typescript
|
||||
{
|
||||
key: 'description',
|
||||
match: {text_any: 'good cheap'}
|
||||
}
|
||||
```
|
||||
+1
-1
@@ -1 +1 @@
|
||||
This code snippet sets up a field condition to search for a specific substring or phrase within a text field. In this case, a special `text` match is defined with the target text being "good cheap". The behavior may vary depending on the configuration of the full-text index for the field. If there is no full-text index configured for the field, the condition will work as an exact substring match.
|
||||
This code snippet sets up a field condition to search for multiple query terms within a text field. In this case, a special `text` match is defined with the target text being "good cheap". A text field is only considered a match if it contains all of the search terms. The behavior may vary depending on the configuration of the full-text index for the field. If there is no full-text index configured for the field, the condition will work as an exact substring match.
|
||||
Reference in New Issue
Block a user