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); }
public static IndexField IsSearchable(this IndexField field, bool value = true) { field.Searchable = value; return(field); }
public static IndexField Analyzer(this IndexField field, string value) { field.Analyzer = value; return(field); }
public static IndexField IsRetrievable(this IndexField field, bool value = true) { field.Retrievable = value; return(field); }
public static IndexField IsKey(this IndexField field, bool value = true) { field.Key = value; return(field); }
public static IndexField IsFacetable(this IndexField field, bool value = true) { field.Facetable = value; return(field); }