@@ -121,8 +121,8 @@ func (c *collectionIndexes) EnsurePersistentIndex(ctx context.Context, fields []
121
121
}
122
122
123
123
result := responseIndex {}
124
- exist , err := c .ensureIndex (ctx , & reqData , & result )
125
- return newIndexResponse (& result ), exist , err
124
+ created , err := c .ensureIndex (ctx , & reqData , & result )
125
+ return newIndexResponse (& result ), created , err
126
126
}
127
127
128
128
func (c * collectionIndexes ) EnsureGeoIndex (ctx context.Context , fields []string , options * CreateGeoIndexOptions ) (IndexResponse , bool , error ) {
@@ -137,8 +137,8 @@ func (c *collectionIndexes) EnsureGeoIndex(ctx context.Context, fields []string,
137
137
}
138
138
139
139
result := responseIndex {}
140
- exist , err := c .ensureIndex (ctx , & reqData , & result )
141
- return newIndexResponse (& result ), exist , err
140
+ created , err := c .ensureIndex (ctx , & reqData , & result )
141
+ return newIndexResponse (& result ), created , err
142
142
}
143
143
144
144
func (c * collectionIndexes ) EnsureTTLIndex (ctx context.Context , fields []string , expireAfter int , options * CreateTTLIndexOptions ) (IndexResponse , bool , error ) {
@@ -155,8 +155,8 @@ func (c *collectionIndexes) EnsureTTLIndex(ctx context.Context, fields []string,
155
155
}
156
156
157
157
result := responseIndex {}
158
- exist , err := c .ensureIndex (ctx , & reqData , & result )
159
- return newIndexResponse (& result ), exist , err
158
+ created , err := c .ensureIndex (ctx , & reqData , & result )
159
+ return newIndexResponse (& result ), created , err
160
160
}
161
161
162
162
func (c * collectionIndexes ) EnsureZKDIndex (ctx context.Context , fields []string , options * CreateZKDIndexOptions ) (IndexResponse , bool , error ) {
@@ -171,8 +171,8 @@ func (c *collectionIndexes) EnsureZKDIndex(ctx context.Context, fields []string,
171
171
}
172
172
173
173
result := responseIndex {}
174
- exist , err := c .ensureIndex (ctx , & reqData , & result )
175
- return newIndexResponse (& result ), exist , err
174
+ created , err := c .ensureIndex (ctx , & reqData , & result )
175
+ return newIndexResponse (& result ), created , err
176
176
}
177
177
178
178
func (c * collectionIndexes ) EnsureMDIIndex (ctx context.Context , fields []string , options * CreateMDIIndexOptions ) (IndexResponse , bool , error ) {
@@ -187,8 +187,8 @@ func (c *collectionIndexes) EnsureMDIIndex(ctx context.Context, fields []string,
187
187
}
188
188
189
189
result := responseIndex {}
190
- exist , err := c .ensureIndex (ctx , & reqData , & result )
191
- return newIndexResponse (& result ), exist , err
190
+ created , err := c .ensureIndex (ctx , & reqData , & result )
191
+ return newIndexResponse (& result ), created , err
192
192
}
193
193
194
194
func (c * collectionIndexes ) EnsureMDIPrefixedIndex (ctx context.Context , fields []string , options * CreateMDIPrefixedIndexOptions ) (IndexResponse , bool , error ) {
@@ -203,8 +203,8 @@ func (c *collectionIndexes) EnsureMDIPrefixedIndex(ctx context.Context, fields [
203
203
}
204
204
205
205
result := responseIndex {}
206
- exist , err := c .ensureIndex (ctx , & reqData , & result )
207
- return newIndexResponse (& result ), exist , err
206
+ created , err := c .ensureIndex (ctx , & reqData , & result )
207
+ return newIndexResponse (& result ), created , err
208
208
}
209
209
210
210
func (c * collectionIndexes ) EnsureInvertedIndex (ctx context.Context , options * InvertedIndexOptions ) (IndexResponse , bool , error ) {
@@ -221,8 +221,8 @@ func (c *collectionIndexes) EnsureInvertedIndex(ctx context.Context, options *In
221
221
}
222
222
223
223
result := responseInvertedIndex {}
224
- exist , err := c .ensureIndex (ctx , & reqData , & result )
225
- return newInvertedIndexResponse (& result ), exist , err
224
+ created , err := c .ensureIndex (ctx , & reqData , & result )
225
+ return newInvertedIndexResponse (& result ), created , err
226
226
}
227
227
228
228
func (c * collectionIndexes ) ensureIndex (ctx context.Context , reqData interface {}, result interface {}) (bool , error ) {
0 commit comments