# Advanced Keyword Matching

#### Overview

TickerTrends lets you build powerful searches to find exactly the posts and comments you're looking for. Instead of typing a single word, you can use special symbols and keywords to combine terms, catch typos, exclude noise, and more — all in one search.

This guide explains every tool available to you, with plain-English examples.

#### Quick Reference

| Symbol/Word     | Example                | What it does                                                  |
| --------------- | ---------------------- | ------------------------------------------------------------- |
| (space)         | `running shoes`        | Finds those two words right next to each other, in that order |
| AND             | `running AND shoes`    | Finds posts that contain both words, anywhere                 |
| OR              | `running OR shoes`     | Finds posts that contain either word                          |
| NOT             | `NOT duolingo`         | Leaves out any post that mentions that word                   |
| -               | `-duolingo`            | Same as NOT — a quicker way to write it                       |
| \~              | `~duolingo`            | Also finds common misspellings of that word                   |
| "..."           | `"running shoes"`      | Treats everything inside the quotes as one phrase             |
| (...)           | `(running OR jogging)` | Groups part of your search together                           |
| \*              | `run*`                 | Matches any word that starts with those letters               |
| title: or body: | `title:duolingo`       | Only searches in the title (or body) of a post                |

***

#### How Each Tool Works

**Typing Two Words Side by Side**

When you type two words with just a space between them, TickerTrends looks for those words **sitting right next to each other, in that exact order**.

* `running shoes` ✅ finds "I bought **running shoes** today"
* `running shoes` ❌ does **not** find "shoes for running" — wrong order
* `running shoes` ❌ does **not** find "running old shoes" — not right next to each other

**AND — Both Words, Anywhere**

Use AND when you want both words to appear in a post, but you don't care where they show up.

* `running AND shoes` ✅ finds "I wear **shoes** when **running**"
* `running AND shoes` ❌ does **not** find "I love running" — the word "shoes" is missing

**OR — Either Word Works**

Use OR when you're happy finding posts that mention one thing or another.

* `duolingo OR babbel` ✅ finds posts mentioning Duolingo, Babbel, or both

**NOT and - — Leave Something Out**

Use NOT (or the minus sign `-` right before a word) to filter out posts that mention something you don't want.

* `duolingo -subscription` ✅ finds "Duolingo is great"
* `duolingo -subscription` ❌ filters out "Duolingo subscription cancelled"
* `NOT duolingo` and `-duolingo` do the exact same thing — pick whichever feels easier

**Parentheses — Grouping Things Together**

Parentheses work just like they do in math: whatever's inside gets handled first. Use them to combine ideas without confusion.

* `(duolingo OR babbel) AND subscription` ✅ finds posts about **either app** that **also** mention subscriptions
* Without the parentheses, your search might not behave the way you expect

**Quotes — Searching for an Exact Phrase**

Wrapping words in quotes tells TickerTrends to treat them as a single phrase. This is most useful when combining with other tools like `~` (see below).

* `"running shoes"` behaves the same as typing `running shoes` — but you can then put a `~` in front of it to fuzzy-match the whole phrase

#### \~ — Catching Typos and Misspellings

Putting a `~` in front of a word tells TickerTrends: "also find posts where someone misspelled this word." It automatically catches one-letter mistakes — a missing letter, a swapped letter, an extra space, or a number substituted for a letter.

* `~duolingo` ✅ finds: duolingo, dulingo, doulingo, "duo lingo", du0lingo

**Fuzzy on a whole phrase:** Put `~` in front of a quoted phrase and it applies to every word in it.

* `~"running shoes"` ✅ finds: "running shoes", "runing shoes", "running shoez"
* `~"running shoes"` ❌ still won't find "shoes running" — order still matters

**Fuzzy on just one word:** `~` only affects the word right after it. The next word stays exact.

* `~running shoes` — "running" allows typos, "shoes" must be spelled perfectly
* This means `~running shoez` would **not** be found

**Fuzzy on multiple words in a row:**

* `~running ~shoes` — both words allow typos, and they still need to appear next to each other

**Fuzzy combined with AND:**

* `~duolingo AND subscription` — finds posts where "duolingo" (or a misspelling) appears **anywhere**, and "subscription" also appears **anywhere**

**One important limit:** You can't put `~` in front of a group in parentheses.

* `~(duolingo OR babbel)` ❌ This won't work
* Instead write: `~duolingo OR ~babbel` ✅

#### \* — Searching by Word Beginnings

The `*` symbol is a wildcard that matches any word starting with the letters you type.

* `run*` ✅ finds: running, runner, runs, rundown
* `run*` ❌ does **not** find "rerun" — it doesn't start with "run"

This is useful when a topic shows up in multiple word forms.

#### title: and body: — Searching in a Specific Place

By default, TickerTrends searches both the title and body of a post. You can narrow it down using `title:` or `body:` to only look in one place.

* `title:"running shoes"` — only finds posts where "running shoes" appears in the **title**
* `title:duolingo -body:sponsored` — finds posts about Duolingo in the title, but filters out any post whose body mentions "sponsored"

#### How Searches Are Evaluated (Order of Operations)

When you combine multiple tools in one search, TickerTrends processes them in this order:

1. `~` and `-` are applied to their word first
2. Words sitting side by side (adjacency) are grouped next
3. AND is applied after that
4. OR is applied last

**Example:** `~running shoes AND jackets OR boots` is actually read as: first find fuzzy "running" next to "shoes", then require "jackets" to also be present, then include anything mentioning "boots" as a separate option.

If that's not what you want, use parentheses to be explicit: `~running AND (shoes OR jackets OR boots)`

#### Real-World Search Examples

| What you're trying to find                               | Search to use                                                      |
| -------------------------------------------------------- | ------------------------------------------------------------------ |
| Mentions of a brand, including typos, with no ads        | `~duolingo -ad -sponsored -affiliate`                              |
| Posts about either of two apps that also discuss pricing | `(duolingo OR babbel) AND (price OR cost OR subscription)`         |
| Complaints about a specific product, by title            | `title:"duolingo plus" AND (cancelled OR refund OR broken OR bug)` |
| A brand name (with typos) mentioned alongside a topic    | `~duolingo streak`                                                 |
| Language learning posts, excluding a specific brand      | `~"language learning" -duolingo`                                   |
| Any form of "learn" paired with a language name          | `learn* AND (spanish OR french OR german)`                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tickertrends.io/tickertrends/documentation-v2/2.-data-coverage-and-data-types/2.2-data-types/advanced-keyword-matching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
