private static FieldIndexing MapFieldIndexTypeToFieldIndexing(FieldIndexType indexType) { var fieldIndexingType = FieldIndexing.Analyzed; switch (indexType) { case FieldIndexType.Analyzed: case FieldIndexType.AnalyzedNoNorms: fieldIndexingType = FieldIndexing.Analyzed; break; case FieldIndexType.NotAnalyzed: case FieldIndexType.NotAnalyzedNoNorms: fieldIndexingType = FieldIndexing.NotAnalyzed; break; case FieldIndexType.NotIndexed: fieldIndexingType = FieldIndexing.No; break; } return(fieldIndexingType); }
PropertyBuilder <T> AsUniqueIndex <Tresult>(Expression <Func <T, Tresult> > member, FieldIndexType indexType) { var m = member.Body as MemberExpression; if (m == null) { throw new Exception("应为MemberExpression" + member); } var name = m.Member.Name; var indexs = getTableIndex <T>(); if (indexs.Index.ContainsKey(name)) { return(this); } indexs.Index.TryAdd(name, indexType); return(this); }
public override string GetColumnUnionIndexScript(string tableName, string indexName, List <string> columns, FieldIndexType fieldIndexType) { throw new NotImplementedException(); }