test is matched to all 3 but will the first "my test document" be RANKED (scored) higher than the others since its a full word match?
No, if you want that, I would recommend that you analyze the text multiple ways by using a multi field (see: fields | Elasticsearch Guide [5.3] | Elastic) so you can match both your ngram and regular analyzed text. Then at query time you can query both within a bool query so both "should" clauses matching will make the score higher of the document you want to have a higher score.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.