public IndexCreationOptions FindIndexCreationOptions(IndexDefinition indexDef) { var indexDefinition = GetIndexDefinition(indexDef.Name); if (indexDefinition != null) { return indexDefinition.Equals(indexDef) ? IndexCreationOptions.Noop : IndexCreationOptions.Update; } return IndexCreationOptions.Create; }