Is it possible to combine my search from above and match_phrase ?
So i both have the search where it searches for all terms, but also a match_phrase and then combine the score of the two results ?
If you want to match a sub-phrase within a larger set of text, you'll want to use the text field type and use the match_phrase query.
If you want an exact match of the field value, you'll want to use the keyword field type and use a match query.
If you want both to come back but have exact matches be preferred, you can use a bool query with an exact phrase or match on keywords in the "should" clause.
The "search in depth" and "proximity-relevance" pages walk through this (and the latter actually gives an example that's very close to what you've asked)
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.