Esempio n. 1
0
        public static IndexType GetAutoIndexType(AutoIndexDefinitionBaseServerSide definition)
        {
            var indexType = IndexType.None;

            if (definition is AutoMapIndexDefinition)
            {
                indexType = IndexType.AutoMap;
            }

            if (definition is AutoMapReduceIndexDefinition)
            {
                indexType = IndexType.AutoMapReduce;
            }

            if (indexType == IndexType.None)
            {
                throw new RachisApplyException($"Invalid definition type: {definition.GetType()}");
            }

            return(indexType);
        }