Question about special character in search query

I’m investigating about using search query in web. I’ve found that the search returns no result, while the query seems to be correct.

I have a document with this title in my database:

abc - def

And here is four search queries, with search success or fail.

  1. abc%20-%20d : success

  2. abc%20-%20 : fail

  3. abc%20- : fail

  4. abc%20 : fail

  5. abc : success

By some trial and error, I’ve found that any query ends with “%20” will fail. But then why query 3 also fails?

It’s quite hard to find a spec for search query, what I can find is just this page, mentioning some feature of search query: