[CSHARP-1412] Support new text search features introduced with v3 text indexes Created: 14/Sep/15  Updated: 20/Jan/16  Resolved: 30/Oct/15

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11, 2.2

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19557 Create Text Index v3 Closed
related to SERVER-17437 Case-sensitive mode for text search Closed
related to DRIVERS-235 Query Builder Support for 3.2 Closed
Epic Link: MongoDB 3.2
Backwards Compatibility: Minor Change

 Comments   
Comment by Githook User [ 30/Oct/15 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1412: Add support for text search options (1.x API).
Branch: v1.x
https://github.com/mongodb/mongo-csharp-driver/commit/8820b1f4078a918dacc6fcede0e582e16aedc685

Comment by Robert Stam [ 29/Oct/15 ]

This is a minor breaking change in the Legacy API, which will only manifest itself if you use a null constant as the second parameter of the QueryBuilder Text method, which will now result in a compile time ambiguity.

string searchString = "...";
string language = null;
TextStringOptions options = null;
 
// these are not ambiguous
Query.Text(searchString); // will use default TextSearchOptions
Query.Text(searchString, language); // will use default language because language is null
Query.Text(searchString, options); // will throw ArgumentNullException because options is null
 
// this is ambiguous
Query.Text(searchString, null); // is null a string or a TextSearchOptions?

Comment by Githook User [ 29/Oct/15 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1412: Add support for text search options (2.x Legacy API).
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/306b2a0e81b82e7670206e081f4a6845a236c512

Comment by Robert Stam [ 28/Oct/15 ]

Backport to Legacy API.

Comment by Githook User [ 15/Oct/15 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1412: Support new text search features introduced with v3 text indexes.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/edf672cbbb39a2594b3473b2d4ce4e4941463ed4

Comment by Robert Stam [ 14/Oct/15 ]

Added a new TextSearchOptions class that can be passed to the FilterDefinitionBuilder's Text method.

It allows passing in the following options:

1. Lanugage
2. CaseSensitive
3. DiacriticSensitive

and might have more properties if future server versions add new text search options.

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