How to improve the search relevance in elasticsearch?

I am having a field named title which is having values as below

  1. apple iphone 6s
  2. apple iphone 6
  3. apple iphone 6s plus
  4. apple iphone
  5. apple iphone 5s

So if user searches for

apple iphone 6
Then it should come in the order as

2 > 1 > 3 > 4 > 5
. and if user searches for

apple iphone 6s
It should come in order as

1 > 3 > 2 > 4 > 5.
How can this be done using elasticsearch.

I have used multi_search and all. But no help.

The order should be exact match first, then prefix. then phrases then field containing all 3 terms and then field containing 2 terms and then field containing 1 terms and so on.

Thank you for your help.