Skip to content

Commit ed8f5ce

Browse files
authored
Documentation edits made through Mintlify web editor
1 parent e5f716e commit ed8f5ce

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

x-api/posts/filtered-stream/integrate/build-a-rule.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ Here is what the rule would look like:
263263
| `keyword` | Standalone | Matches a keyword within the body of a Post. This is a tokenized match, meaning that your keyword string will be matched against the tokenized text of the Post body. Tokenization splits words based on punctuation, symbols, and Unicode basic plane separator characters.<br/>For example, a Post with the text “I like coca-cola” would be split into the following tokens: I, like, coca, cola. These tokens would then be compared to the keyword string used in your rule. To match strings containing punctuation (for example, coca-cola), symbol, or separator characters, you must wrap your keyword in double-quotes.<br/><br/>Example: `pepsi OR cola OR "coca cola"` |
264264
| `emoji` | Standalone | Matches an emoji within the body of a Post. Similar to a keyword, emojis are a tokenized match, meaning that your emoji will be matched against the tokenized text of the Post body.<br/><br/>Note that if an emoji has a variant, you must wrap it in double quotes to add to a rule.<br/><br/>Example: `(😃 OR 😡) 😬` |
265265
| `"exact phrase match"` | Standalone | Matches the exact phrase within the body of a Post.<br/><br/>Example: `("X API" OR #v2) -"filtered stream"` |
266+
| `"keyword1 keyword2"~N` | Standalone | Proximity operator that matches a Post where keywords are within `N` tokens of each other.<br/>Keywords in reverse order can be no more than `N-2` tokens apart. `N` cannot be greater than `6`.<br/><br/>Example: `"social media"~5 OR "API"~3` |
266267
| `#` | Standalone | Matches any Post containing a recognized hashtag, if the hashtag is a recognized entity in a Post.<br/><br/>This operator performs an exact match, NOT a tokenized match, meaning the rule `#thanku` will match posts with the exact hashtag #thanku, but not those with the hashtag #thankunext.<br/><br/>Example: `#thankunext #fanart OR @arianagrande` |
267268
| `@` | Standalone | Matches any Post that mentions the given username, if the username is a recognized entity (including the @ character).<br/><br/>Example: `(@XDevelopers OR @api) -@x` |
268269
| `$` | Standalone | Matches any Post that contains the specified 'cashtag' (where the leading character of the token is the &dollar; character).<br/><br/>Note that the cashtag operator relies on X's 'symbols' entity extraction to match cashtags, rather than trying to extract the cashtag from the body itself.<br/><br/>Example: `$twtr OR @XDevelopers -$fb` |

0 commit comments

Comments
 (0)