@@ -121,8 +121,8 @@ func (c *collectionIndexes) EnsurePersistentIndex(ctx context.Context, fields []
121121 }
122122
123123 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
126126}
127127
128128func (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,
137137 }
138138
139139 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
142142}
143143
144144func (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,
155155 }
156156
157157 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
160160}
161161
162162func (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,
171171 }
172172
173173 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
176176}
177177
178178func (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,
187187 }
188188
189189 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
192192}
193193
194194func (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 [
203203 }
204204
205205 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
208208}
209209
210210func (c * collectionIndexes ) EnsureInvertedIndex (ctx context.Context , options * InvertedIndexOptions ) (IndexResponse , bool , error ) {
@@ -221,8 +221,8 @@ func (c *collectionIndexes) EnsureInvertedIndex(ctx context.Context, options *In
221221 }
222222
223223 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
226226}
227227
228228func (c * collectionIndexes ) ensureIndex (ctx context.Context , reqData interface {}, result interface {}) (bool , error ) {
0 commit comments