File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -682,15 +682,16 @@ export class MongoStorageAdapter implements StorageAdapter {
682
682
schema : SchemaType ,
683
683
fieldNames : string [ ] ,
684
684
indexName : ?string ,
685
- caseInsensitive : boolean = false
685
+ caseInsensitive : boolean = false ,
686
+ indexType : any = 1
686
687
) : Promise < any > {
687
688
schema = convertParseSchemaToMongoSchema ( schema ) ;
688
689
const indexCreationRequest = { } ;
689
690
const mongoFieldNames = fieldNames . map ( fieldName =>
690
691
transformKey ( className , fieldName , schema )
691
692
) ;
692
693
mongoFieldNames . forEach ( fieldName => {
693
- indexCreationRequest [ fieldName ] = 1 ;
694
+ indexCreationRequest [ fieldName ] = indexType ;
694
695
} ) ;
695
696
696
697
const defaultOptions : Object = { background : true , sparse : true } ;
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ export interface StorageAdapter {
92
92
schema : SchemaType ,
93
93
fieldNames : string [ ] ,
94
94
indexName ? : string ,
95
- caseSensitive ? : boolean
95
+ caseSensitive ? : boolean ,
96
+ indexType ? : any
96
97
) : Promise < any > ;
97
98
ensureUniqueness (
98
99
className : string ,
You can’t perform that action at this time.
0 commit comments