A match query searches for terms occurring in the specified positions and offsets. The input text is analyzed and a phrase query is built with the terms resulting from the analysis. This depends on term vectors, which are consulted to determine phrase distance.
Inheritance: FtsQueryBase
        public void Export_Omits_Field_If_Not_Provided()
        {
            var query = new MatchPhraseQuery("phrase");

            var expected = JsonConvert.SerializeObject(new
            {
                match_phrase = "phrase",
            }, Formatting.None);

            Assert.AreEqual(expected, query.Export().ToString(Formatting.None));
        }
        public void Export_Returns_Valid_Json()
        {
            var query = new MatchPhraseQuery("phrase")
                .Field("field");

            var expected = JsonConvert.SerializeObject(new
            {
                match_phrase = "phrase",
                field = "field"
            }, Formatting.None);

            Assert.AreEqual(expected, query.Export().ToString(Formatting.None));
        }
        public void Boost_WhenBoostIsLessThanZero_ThrowsArgumentOutOfRangeException()
        {
            var query = new MatchPhraseQuery("phrase");

            Assert.Throws<ArgumentOutOfRangeException>(() => query.Boost(-.1));
        }
        public void Boost_ReturnsMatchPhraseQuery()
        {
            var query = new MatchPhraseQuery("phrase").Boost(2.2);

            Assert.IsInstanceOf<MatchPhraseQuery> (query);
        }