<!-- The markdown copy of https://oppalerts.com/docs/the-data/how-to-search-the-indexes . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [The Data](https://oppalerts.com/docs/the-data/) / How to Search the Indexes

# How to Search the Indexes

Write queries for the News Index and Prospect Index, and fix formatting errors.

## Where these rules apply

These rules apply to queries you enter in these places:

- In the web app: the **Title query** box and the **Body query** box of [Advanced Search](https://oppalerts.com/docs/app/opportunities/advanced_search), the type pages, the brand pages, and a saved opportunity.
- In the API and MCP tools: the fields `title_query` and `body_query` of the search tools, for example [`news_search`](https://oppalerts.com/docs/mcp/news_search) and [`prospects_search`](https://oppalerts.com/docs/mcp/prospects_search).

Brand names, websites, and Similarity text are not queries, so these rules do not apply to them. [How Terms Are Matched](https://oppalerts.com/docs/the-data/how-terms-are-matched) explains how brand names are searched.

## The characters of a query

OppAlerts searches English text. A query can contain only:

- The letters a to z. Uppercase and lowercase match the same words: `Hotel` and `hotel` find the same pages.
- The digits 0 to 9.
- Spaces.
- The 3 characters `-`, `_`, and `@` inside a word.
- The search operators, each used in a valid position. [Advanced Search Operators](https://oppalerts.com/docs/the-data/advanced-search-operators) explains each one.

Any other character causes a formatting error, and the query is rejected.

## How the index reads a word

A word contains letters and digits. It can also contain a `-`, a `_`, or an `@` inside it, with a letter or a digit directly before it and directly after it:

- `coca-cola` is 1 word. `"coca cola"`, with a space, is a phrase of 2 words, and it finds other pages. Use the form that appears on the pages you want to find.
- `user_name` and `info@example` are 1 word each.
- These words also work within a phrase: `"coca-cola classic"`.

A `-`, a `_`, or an `@` at the start or at the end of a word is refused, as in `user_`, `@hotel`, or `hotel-`. There is 1 exception: a `-` directly before a word or a phrase, after a space or at the start of the query, is the [negation operator](https://oppalerts.com/docs/the-data/advanced-search-operators#negation-operator). `hotel -motel` removes the pages that have "motel".

The index also reads each word of a query in these ways:

- A word and its other forms are the same word: `hotel` also finds "hotels". The [exact form modifier](https://oppalerts.com/docs/the-data/advanced-search-operators#exact-form-modifier) `=` before a word finds only that form: `=hotels`.
- A word of one character is not kept. It finds nothing by itself: `x`.
- Some short, common words are not kept. Examples are "a", "and", "at", "of", "or", and "the".
- A `*` needs 3 characters before it: `hot*`. See [Wildcard operators](https://oppalerts.com/docs/the-data/advanced-search-operators#wildcard-operators).
- A period, and each other character that is not allowed, is not a part of a word in the index. The index holds "booking.com" as the 2 words "booking" and "com". For this reason, the form that works for `booking.com` is `"booking com"`.

## The characters that are refused

OppAlerts reserves all other characters for search operators it may add later. It does not guess what these characters mean. Queries containing them are rejected.

Remove the character, or type a space in its place. To keep 2 words together, put them in quotes as a phrase. The examples below show rejected queries and their accepted forms:

- `what is a hotel?`: type `what is a hotel`.
- `AT&T`: type `"AT T"`. This query is accepted, but it finds no page: "at" is a common word that is not kept, and "T" has one character. See [Names that cannot be found](https://oppalerts.com/docs/the-data/how-terms-are-matched#names-that-cannot-be-found).
- `50% off`: type `50 off`.
- `24/7`: type `"24 7"`.
- `$100`: type `100`.
- `#hotel`: type `hotel`.
- `booking.com`: type `"booking com"`.
- `info@example.com`: type `"info@example com"`.
- `children's hospital`: type `childrens
 hospital`.
- `hotels, motels`: type `hotels motels`.

## English only

Queries reject the following:

- A letter with an accent. `café` is refused: type `cafe`. The index stores "café" as "cafe", so `cafe` finds the pages that write "café".
- Text in another script: Greek, Cyrillic, Arabic, Chinese, Japanese, Korean, Thai, and Hindi.

## The 2 changes that OppAlerts makes

OppAlerts changes a query in 2 ways only:

- A curly quote is read as the standard quote `"`: `“day spa”` searches the phrase "day spa".
- White space. A non-breaking space is read as a space. The spaces and the line breaks at the start and at the end of the query are removed. Each run of spaces and line breaks between 2 words becomes 1 space.

OppAlerts makes no other changes and does not correct query errors.

## A query with a formatting error

A query with a formatting error is rejected. It is neither searched nor saved. The page or tool identifies the box or field, explains the error, and links to this page or to [Advanced Search Operators](https://oppalerts.com/docs/the-data/advanced-search-operators). Correct the query, and then search or save again.

A saved opportunity is not counted if its stored query fails these rules. Correct its query on the [Edit Campaign](https://oppalerts.com/docs/app/campaign/edit) page. Daily counts resume after you correct the query.

## Related Pages

- [Advanced Search Operators](https://oppalerts.com/docs/the-data/advanced-search-operators) Each operator of a Title query and a Body query, and its wrong uses.
- [How Terms Are Matched](https://oppalerts.com/docs/the-data/how-terms-are-matched) How the index splits text into words, and how a brand name is searched.
- [Advanced Search](https://oppalerts.com/docs/app/opportunities/advanced_search) How to use the Advanced Search page of the OppAlerts web app.
