Пример #1
0
        public void MultipleCriteria()
        {
            var q    = SolrMultipleCriteriaQuery.Create(new SolrQueryByField("desc", "samsung"), new SolrQueryByRange <decimal>("price", 100, 200));
            var notq = new SolrNotQuery(q);

            Assert.AreEqual("-(desc:(samsung)  price:[100 TO 200])", Serialize(notq));
        }
Пример #2
0
        public void RangeQuery()
        {
            var q    = new SolrQueryByRange <decimal>("price", 100, 200);
            var notq = new SolrNotQuery(q);

            Assert.AreEqual("-price:[100 TO 200]", Serialize(notq));
        }
Пример #3
0
        public void QueryInList()
        {
            var q    = new SolrQueryInList("desc", "samsung", "hitachi", "fujitsu");
            var notq = new SolrNotQuery(q);

            Assert.AreEqual("-(desc:((samsung) OR (hitachi) OR (fujitsu)))", Serialize(notq));
        }
Пример #4
0
        public void SimpleQuery()
        {
            var q    = new SolrQuery("desc:samsung");
            var notq = new SolrNotQuery(q);

            Assert.AreEqual("-desc:samsung", Serialize(notq));
        }
Пример #5
0
        public void QueryByField()
        {
            var q    = new SolrQueryByField("desc", "samsung");
            var notq = new SolrNotQuery(q);

            Assert.AreEqual("-desc:(samsung)", Serialize(notq));
        }
Пример #6
0
 public void SimpleQuery()
 {
     var q = new SolrQuery("desc:samsung");
     var notq = new SolrNotQuery(q);
     Assert.AreEqual("-desc:samsung", Serialize(notq));
 }
Пример #7
0
 public void RangeQuery()
 {
     var q = new SolrQueryByRange<decimal>("price", 100, 200);
     var notq = new SolrNotQuery(q);
     Assert.AreEqual("-price:[100 TO 200]", Serialize(notq));
 }
Пример #8
0
 public void QueryInList()
 {
     var q = new SolrQueryInList("desc", "samsung", "hitachi", "fujitsu");
     var notq = new SolrNotQuery(q);
     Assert.AreEqual("-(desc:samsung OR desc:hitachi OR desc:fujitsu)", Serialize(notq));
 }
Пример #9
0
 public void QueryByField()
 {
     var q = new SolrQueryByField("desc", "samsung");
     var notq = new SolrNotQuery(q);
     Assert.AreEqual("-desc:samsung", Serialize(notq));
 }
Пример #10
0
 public void MultipleCriteria()
 {
     var q = SolrMultipleCriteriaQuery.Create(new SolrQueryByField("desc", "samsung"), new SolrQueryByRange<decimal>("price", 100, 200));
     var notq = new SolrNotQuery(q);
     Assert.AreEqual("-(desc:samsung  price:[100 TO 200])", Serialize(notq));
 }