public void TestWeight()
        {
            var options = IndexOptions <TestClass> .SetWeight(x => x.textfield, 2);

            string expected = "{ \"weights\" : { \"textfield\" : 2 } }";

            Assert.Equal(expected, options.ToJson());
        }
Beispiel #2
0
        public void TestMultipleWeights()
        {
            var options = IndexOptions <TestClass> .SetWeight(x => x.textfield, 2).SetWeight(x => x.idioma, 10);

            string expected = "{ \"weights\" : { \"textfield\" : 2, \"idioma\" : 10 } }";

            Assert.AreEqual(expected, options.ToJson());
        }