Beispiel #1
0
 public FacetFieldQuery()
 {
     Limit    = -1;
     MinCount = 0;
     SortType = FacetSortType.Index;
     Result   = new List <KeyValuePair <string, int> >();
 }
Beispiel #2
0
 public SortFacet(IField field, FacetSortType sort = FacetSortType.Count, int size = 10)
     : base(field)
 {
     _sort = sort;
     _size = size;
 }
Beispiel #3
0
 public SortFacet(string field, FacetSortType sort = FacetSortType.Count, int size = 10)
     : this(new Field(field), sort, size)
 {
 }
Beispiel #4
0
        /// <summary>
        /// Configure sort type of result of facet
        /// </summary>
        /// <param name="parameter">Parameter to configure</param>
        /// <param name="sortType">Sort type of result of facet</param>
        public static IFacetSpatialParameter <TDocument> SortType <TDocument>(this IFacetSpatialParameter <TDocument> parameter, FacetSortType sortType)
            where TDocument : Document
        {
            parameter.SortType = sortType;

            return(parameter);
        }
Beispiel #5
0
        /// <summary>
        /// Configure sort type of result of facet
        /// </summary>
        /// <param name="parameter">Parameter to configure</param>
        /// <param name="value">Sort type of result of facet</param>
        public static IFacetFieldParameter <TDocument> SortType <TDocument>(this IFacetFieldParameter <TDocument> parameter, FacetSortType value)
            where TDocument : Document
        {
            parameter.SortType = value;

            return(parameter);
        }
Beispiel #6
0
 public SortFacet(string field, FacetSortType sort = FacetSortType.Count, int size = 10)
     : this(new Field(field), sort, size)
 {
 }
Beispiel #7
0
 public SortFacet(IField field, FacetSortType sort = FacetSortType.Count, int size = 10)
     : base(field)
 {
     _sort = sort;
     _size = size;
 }