Today we use Lucene's MultiPhraseQuery to set phrase queries in the same position. Elastic (and NEST) comes with a "MatchPhrase" query that can get only one phrase (string). There is an equivalent to MultiPhraseQuery as well?
@forloop, thank you for your response.
I don't think MultiPhraseQuery (lucene) is equivalent to Match Phrase Prefix query (elastic).
MultiPhraseQuery is "A generalized version of PhraseQuery, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR)."
While Match Phrase Prefix query is "The match_phrase_prefix is the same as match_phrase, except that it allows for prefix matches on the last term in the text"
It is true that you can use both for some functionality, but it is not the same.
The main feature for MultiPhraseQuery is the fact that both terms are in the same position.
Thank you. span or is similar but with some main differences:
1 - Performance is not as fast as MultiPhrseQuery
2 - it calculates scoring differently (not dismax, but sum like bool query)
There is a way to expose it in the next version or with a patch?
This is a powerful MultiPhrseQuery type in lucene.
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.