Shotnest · Library
Review spacing when a phrase is not found
On this page Gate 12 misses the record Gate 12 with a double space, while the Shotnest app finds both because it matches each word separately.
Substring search versus word search
The web search tool normalizes the query, trims its ends and looks for it as one continuous substring. It does not shrink the spaces inside. A query with one space therefore cannot match a record with two spaces in the same place, and the example returns only record 2. Typing the double space, Gate 12, returns only record 1.
The Shotnest app splits the query on whitespace into separate words and requires each of them to appear in the screenshot's text. Gate and 12 are both present in either record, so the app returns both. The comparison tool on this page also treats the two records as equal after normalization, because it collapses whitespace runs.
Spaces at the start or end of the query are trimmed, so typing Gate 12 with a trailing space still returns record 2. Only the spaces inside the phrase change the result.
Try the original example
- Supplied records
- Gate 12 — Gate 12
- Query
- Gate 12
- Matching record numbers
- 2
When a phrase is not found
- Search one distinctive token, such as 12, which finds both records.
- Check the record for double spaces or a line break inside the phrase.
- In the app, type the words separately; their order does not matter.
- Use the comparison tool if you need to know whether two texts differ only in spacing.
- Query Gate 12 with two spaces
- record 1
- Query 12
- records 1, 2
- Query Gate 12 in the Shotnest app
- records 1, 2
Spacing traps
- Text recognition often inserts two spaces where a screen has a column gap or a tab.
- A phrase split over two lines contains a line break, which the web search does not treat as a space match for a single space.
- Quoting a phrase does not force an exact phrase search in either tool; quotes are searched as characters.
- Adding a space at either end in the app changes nothing either, because the query is split into words before it is matched.
Know which search you are using
The page tool shows the strict substring rule; the app is more forgiving about word order and spacing. Neither can find words that were not read from the image.