示例#1
0
        private IndexField(string name, object value, IndexTypeCode typeCode)
        {
            Guard.NotEmpty(name, nameof(name));

            Name     = name;
            Value    = value;
            TypeCode = typeCode;
        }
示例#2
0
 public FacetValue(object value, object upperValue, IndexTypeCode typeCode, bool includesLower, bool includesUpper)
 {
     Value         = value;
     UpperValue    = upperValue;
     TypeCode      = typeCode;
     IncludesLower = includesLower;
     IncludesUpper = includesUpper;
     IsRange       = true;
 }
示例#3
0
        private static SearchFilter ByField(string fieldName, object term, IndexTypeCode typeCode)
        {
            Guard.NotEmpty(fieldName, nameof(fieldName));

            return(new SearchFilter
            {
                FieldName = fieldName,
                Term = term,
                TypeCode = typeCode
            });
        }
示例#4
0
        private static RangeSearchFilter ByRange(
            string fieldName,
            object lowerTerm,
            object upperTerm,
            IndexTypeCode typeCode,
            bool includeLower,
            bool includeUpper)
        {
            Guard.NotEmpty(fieldName, nameof(fieldName));

            return(new RangeSearchFilter
            {
                FieldName = fieldName,
                Term = lowerTerm,
                UpperTerm = upperTerm,
                TypeCode = typeCode,
                IncludesLower = includeLower,
                IncludesUpper = includeUpper
            });
        }
示例#5
0
 public FacetValue(object value, IndexTypeCode typeCode)
 {
     Value    = value;
     TypeCode = typeCode;
     IsRange  = false;
 }
示例#6
0
        private static SearchSort ByField(string fieldName, IndexTypeCode typeCode, bool descending = false)
        {
            Guard.NotEmpty(fieldName, nameof(fieldName));

            return(new SearchSort(fieldName, typeCode, descending));
        }
示例#7
0
 private SearchSort(string name, IndexTypeCode typeCode, bool descending)
 {
     FieldName  = name;
     TypeCode   = typeCode;
     Descending = descending;
 }