예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public override string GetColumnUnionIndexScript(string tableName, string indexName, List <string> columns, FieldIndexType fieldIndexType)
 {
     throw new NotImplementedException();
 }