this is an extremely broad question, and the answer basically contains a couple of books - I'll try to keep it short at the expense of gross simplification.
First, you have not specified what is the query and what is the document, so it is hard to figure out what you are after. Also you mentioned a phrase query, which searches for terms next to each other, which is something completely different than a 'similar` query.
So the question is, what do you want to archive. Searching only for a partial match, like in your second name search? You may want to take a look at the
match query in combination with
minimum_should_match. You also may want to take a look at the
boolean query to score exact matches higher. Next, you may want to take a look at synonyms to match terms that are semantically similar, but written very different. Then, you may want to take typos into account by applying some fuzziness.
Searching for names comes with its own complexities compared to regular full text search. You may want to take a look at the phonetic analysis plugin, which allows to search for similar names using phonetic algorithms.
Long story short: If you are searching for one out of the box query to answer all your questions you will not find it, you need to understand the different ways of indexing fields into elasticsearch, how single terms are stored in the inverted index (think ngrams, edge ngrams, synonyms on top of splitting each value in a field) and how queries affect your scoring and the matching of documents.
P.S. Despite its age, I highly recommend reading the definitive guide, as there is a whole chapter about scoring, improving relevancy and so forth, See https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html - a book like relevant search (released at manning) might also be interesting for you.