<!-- The markdown copy of https://oppalerts.com/docs/the-data/how-terms-are-matched . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [The Data](https://oppalerts.com/docs/the-data/) / How Terms Are Matched

# How Terms Are Matched

Understand how search matches brand names and why some names cannot be found.

## Where these rules apply

The News Index and the Prospect Index split the text of each page into words. Searches apply the same rules to the words you enter. Both indexes use the same rules.

The rules apply to a Title query and a Body query, in the web app and in the fields `title_query` and `body_query` of the MCP and API tools. The operators, such as `OR`, `-`, and `*`, are on their own page: [Advanced Search Operators](https://oppalerts.com/docs/the-data/advanced-search-operators). A query can contain only the letters a to z, the digits 0 to 9, spaces, a `-`, `_`, or `@` inside a word, and these operators. Every other character, such as a period, an apostrophe, "&", or a letter with an accent, is a formatting error, and the query is rejected. [How to Search the Indexes](https://oppalerts.com/docs/the-data/how-to-search-the-indexes) explains all the query rules. Examples containing these characters on this page refer to brand names and page text.

The brand searches, such as [Brand Mentions](https://oppalerts.com/docs/app/visibility/brand_mentions) and [Brand Unlinked Mentions](https://oppalerts.com/docs/app/opportunities/brand_unlinked), search the title and the body of each page. They search for each brand name and each host name of the organization as an exact phrase. Each word of the phrase must be in the same form: "hotels" does not find "hotel".

## How terms are matched

- **Upper and lower case are the same.** "Marriott" and "marriott" are the same word.
- **A word holds only letters, digits, hyphens (-), underscores (_), and at signs (@).** The index splits text into words at every other character, including a period, a space, "&", "+", "/", and an apostrophe.
- **A period is the same as a space.** "marriott.com", "Marriott.com", and "Marriott com" are the same 2 words. A brand search for marriott.com also finds a page that writes "Marriott com". In a query, type `"marriott com"`.
- **A hyphen stays inside the word.** "coca-cola" is one word. So "coca-cola.com" is found. A brand search for "coca cola.com", with a space in place of the hyphen, does not find the pages that write "coca-cola.com". If pages write your name in the 2 forms, add the 2 forms as 2 brand names. In a query, a hyphen, an underscore, or an at sign between 2 letters or digits stays in the word: `coca-cola`, `user_name`, and `info@example` work as you type them, and `"coca cola"`, with a space, finds other pages. At the start or the end of a word, these 3 characters are refused.
- **An accent does not change a word.** The index stores "café" as "cafe". Accented letters are rejected in queries: type `cafe`, and it finds the pages that write "café".
- **OppAlerts changes no character of a brand name.** It sends the entire name to the index, which applies the same rules it uses for page text. In a query, `?` and `%` are refused, and a `*` is allowed only at the end of a word: see [Wildcard operators](https://oppalerts.com/docs/the-data/advanced-search-operators#wildcard-operators).
- **A curly quote is a straight quote.** OppAlerts reads “day spa” as "day spa".
- **A `"` with no second `"` is refused.** The query is not searched. Add the second `"`, or remove the first one.
- **A word of one character is not kept.** The shortest word that the search keeps has 2 characters.
- **Some short, common words are not kept.** Examples are "a", "and", "at", "of", "or", and "the".

## Names that cannot be found

The index drops single-character words and some common words from both page text and searches. Characters other than letters, digits, hyphens, underscores, and at signs split names into words. Some names have no searchable words left after this process. They return no pages, even when searched as an exact phrase in quotes:

- **AT&T**: the search looks for the phrase "AT&T". The "&" splits the name into "AT" and "T". "At" is a common word that the index does not keep, and "T" has one character.
- **C++**: the search looks for the phrase "C++". The only word is "C", with one character.
- **X**: the only word has one character.

Some names lose a word, leaving only the remaining words to search:

- **E*TRADE**: the `*` is not a part of a word, so the index splits the name into "E" and "TRADE". The index drops the "E", because it has one character. The search finds every page with the word "trade".

These names can be found because the index keeps each of their words:

- **marriott.com**: the 2 words "marriott" and "com".
- **coca-cola.com**: the 2 words "coca-cola" and "com".
- **Procter & Gamble**: the 2 words "procter" and "gamble".

The brand searches also search each host name of the organization. A page that writes a host name, such as marriott.com, is found by that host name. Add the hosts on the Settings tab of [Edit Campaign](https://oppalerts.com/docs/app/campaign/edit).

## Related Pages

- [Advanced Search Operators](https://oppalerts.com/docs/the-data/advanced-search-operators) The operators of a Title query and a Body query, and the formatting errors.
- [How Mentions and Links Are Matched](https://oppalerts.com/docs/the-data/how-mentions-and-links-are-matched) How OppAlerts decides that a page mentions or links to a brand.
- [Brand Mentions](https://oppalerts.com/docs/app/visibility/brand_mentions) How to use the Brand Mentions page of the OppAlerts web app.
- [Brand Unlinked Mentions](https://oppalerts.com/docs/app/opportunities/brand_unlinked) How to use the Brand Unlinked Mentions page of the OppAlerts web app.
