public static Index WithField(this Index index, string name, string type, Action <IndexField> options = null)
        {
            var field = new IndexField(name, type);

            if (options != null)
            {
                options(field);
            }
            index.Fields.Add(field);
            return(index);
        }
示例#2
0
 public static IndexField IsSearchable(this IndexField field, bool value = true)
 {
     field.Searchable = value;
     return(field);
 }
示例#3
0
 public static IndexField Analyzer(this IndexField field, string value)
 {
     field.Analyzer = value;
     return(field);
 }
示例#4
0
 public static IndexField IsRetrievable(this IndexField field, bool value = true)
 {
     field.Retrievable = value;
     return(field);
 }
示例#5
0
 public static IndexField IsKey(this IndexField field, bool value = true)
 {
     field.Key = value;
     return(field);
 }
示例#6
0
 public static IndexField IsFacetable(this IndexField field, bool value = true)
 {
     field.Facetable = value;
     return(field);
 }