diff --git a/argilla/docs/how_to_guides/query.md b/argilla/docs/how_to_guides/query.md index 7ea2247643..eaf2c877f3 100644 --- a/argilla/docs/how_to_guides/query.md +++ b/argilla/docs/how_to_guides/query.md @@ -67,27 +67,15 @@ To search for records with terms, you can use the `Dataset.records` attribute wi If you need more complex searches, you can use [Elasticsearch's simple query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#simple-query-string-syntax). Here is a summary of the different available operators: -=== "Descriptions" - | operator | description | - | ------------ | --------------------------------------------------------- | - |`+` or `space`| **AND**: matches records that contain both terms | - |`|` | **OR**: matches records that contain either term | - |`-` | **Negation**: exclude records that contain a specific term| - |`*` | **Prefix**:matches records that contain a specific prefix | - |`"` | **Phrase**: matches records that contain a specific phrase| - |`(` and `)` | **Precedence**: group terms | - |`~N` | **Edit distance**: matches records that contain a term or phrase with an edit distance| - -=== "Examples" - | operator | example | explanation | - | ------------ | ----------------------------- | ----------------------------------------------- | - |`+` or `space`| `argilla + distilabel` or `argilla distilabel`| returns records that include the terms "argilla" and "distilabel"| - |`|` | `argilla | distilabel` | returns records that include the term "argilla" or "distilabel"| - |`-` | `argilla -distilabel` | returns records that contain the term "argilla" and don't have the term "distilabel"| - |`*` | `arg*` | returns records with any words starting with "arg-"| - |`"` | `"argilla and distilabel"` | returns records that contain the phrase "argilla and distilabel"| - |`(` and `)` | `(argilla | distilabel) rules`| returns records that contain either "argilla" or "distilabel" and "rules"| - |`~N` | `argilla~1` | returns records that contain the term "argilla" with an edit distance of 1, e.g. "argila"| +| operator | description | example | +| ------------ | --------------------------- | --------------------------------------------------------------------- | +|`+` or `space`| **AND**: search both terms | `argilla + distilabel` or `argilla distilabel`
return records that include the terms "argilla" and "distilabel"| +|`|` | **OR**: search either term | `argilla | distilabel`
returns records that include the term "argilla" or "distilabel"| +|`-` | **Negation**: exclude a term| `argilla -distilabel`
returns records that contain the term "argilla" and don't have the term "distilabel"| +|`*` | **Prefix**: search a prefix | `arg*`
returns records with any words starting with "arg-"| +|`"` | **Phrase**: search a phrase | `"argilla and distilabel"`
returns records that contain the phrase "argilla and distilabel"| +|`(` and `)` | **Precedence**: group terms | `(argilla | distilabel) rules`
returns records that contain either "argilla" or "distilabel" and "rules"| +|`~N` | **Edit distance**: search a term or phrase with an edit distance| `argilla~1`
returns records that contain the term "argilla" with an edit distance of 1, e.g. "argila"| !!! tip To use one of these characters literally, escape it with a preceding backslash `\`, e.g. `"1 \+ 2"` would match records where the phrase "1 + 2" is found.