[CSHARP-2566] How do I run a full text search on a property using the C# LINQ Driver? Created: 29/Mar/19 Updated: 27/Oct/23 Resolved: 30/May/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.8.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical - P2 |
| Reporter: | Vijay Devappa | Assignee: | Wan Bachtiar |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | question | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I have a text index defined like this:
How do I use LINQ to run a search which utilizes this text index? I have searched everywhere, cannot figure it out.
|
| Comments |
| Comment by Richard Collette [ 31/Jul/19 ] | ||||||||||||||||
|
@vijay1979 - How would you project MetaTextScore when using IMongoQueryable? | ||||||||||||||||
| Comment by Wan Bachtiar [ 24/May/19 ] | ||||||||||||||||
Hi Vijay, Currently the driver does not have LINQ support yet for text search. An alternative workaround is to use the builders instead of LINQ. Example:
Regards, | ||||||||||||||||
| Comment by Vijay Devappa [ 01/Apr/19 ] | ||||||||||||||||
|
This is the workaround which works:
|