[CSHARP-4660] Add search index management helpers Created: 25/May/23  Updated: 12/Sep/23  Resolved: 18/Jul/23

Status: Closed
Project: C# Driver
Component/s: Index Management
Affects Version/s: None
Fix Version/s: 2.21.0

Type: Spec Change Priority: Unknown
Reporter: PM Bot Assignee: Boris Dogadov
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Issue split
split from DRIVERS-2637 Add search index management helpers Closed
Epic Link: Ability to create and manage Atlas search indexes
Server Compat: 7.0
Quarter: FY24Q2
Case:
Upstream Changes Summary:

DRIVERS-2637:

Drivers may notice that the new unified tests for the collection helpers expect and ignore server errors, effectively unit testing that drivers construct commands correctly.  DRIVERS-2630 will add proper integration testing.

syntax document for new commands: https://docs.google.com/document/d/1rCU7vLmMEn-87SuSZ3xnnSpnkwoWpekyOl15NPIqTJk/edit#heading=h.4kreenf4jheu

There are additional clarifications added to the search index specification in https://github.com/mongodb/specifications/commit/267a54d1bb9af894d05d3dd1a6bda0fa53e20a3f.

Documentation Changes: Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
How to configure an Atlas Search Index using the new C# driver API

2. Would you like the user to see examples of the syntax and/or executable code and its output?

Yes

3. Which versions of the driver/connector does this apply to?

>2.21.0


 Description   

This ticket was split from DRIVERS-2637, please see that ticket for a detailed description.



 Comments   
Comment by Cédric Luthi [ 24/Aug/23 ]

Breaking changes could be avoided by adding a new interface that extends the previous one, just like IBuildEngine9. 😜

Comment by Boris Dogadov [ 11/Aug/23 ]

Hi cedric.luthi@gmail.com 
We are trying to minimize the breaking changes in our driver, with majority of them being additive changes.
But in some cases breaking changes are required, like adding a new interface member.

For cases like this we will consider using default interface methods for newer target frameworks in the future.

Comment by Cédric Luthi [ 11/Aug/23 ]

Adding IMongoSearchIndexManager SearchIndexes { get; } to the IMongoCollection interface was a breaking change.

In practical terms it broke the MongoDB.Extensions.Transactions package with System.TypeLoadException:

Method 'get_SearchIndexes' in type 'MongoDB.Extensions.Transactions.MongoTransactionCollection`1' from assembly 'MongoDB.Extensions.Transactions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Please consider using NuGet package validation in the future to avoid such breaking changes.

Comment by Githook User [ 18/Jul/23 ]

Author:

{'name': 'BorisDog', 'email': 'BorisDog@users.noreply.github.com', 'username': 'BorisDog'}

Message: CSHARP-4660: Add search index management helpers (#1119)
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/5185f71c4e15654dc1006f4d1d90e17ac98bf186

Generated at Wed Feb 07 21:48:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.