.Net: feat: Modernize BingTextSearch connector with ITextSearch<TRecord> interface (microsoft#10456) #13188
+245
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modernize BingTextSearch connector with ITextSearch interface
Problem Statement
The BingTextSearch connector currently only implements the legacy ITextSearch interface, forcing users to use clause-based TextSearchFilter instead of modern type-safe LINQ expressions. This creates runtime errors from property name typos and lacks compile-time validation.
Technical Approach
This PR modernizes the BingTextSearch connector to implement the generic ITextSearch interface alongside the existing legacy interface. The implementation provides recursive expression tree processing to convert LINQ patterns into Bing Web Search API advanced operators.
Implementation Details
Core Changes
Expression Tree Processing
Code Examples
Before (Legacy Interface)
After (Generic Interface)
Implementation Benefits
Type Safety & Developer Experience
Enhanced Filtering Capabilities
Validation Results
Build Verification
dotnet build --configuration Release
dotnet build src/Plugins/Plugins.Web/Plugins.Web.csproj --configuration Release
Test Coverage
Code Quality
dotnet format SK-dotnet.slnx --verify-no-changes
- 0 files needed formattingFiles Modified
Breaking Changes
None. All existing BingTextSearch functionality preserved with zero regressions.
Multi-PR Context
This is PR 3 of 6 in the structured implementation approach for Issue #10456. This PR extends LINQ filtering support to the BingTextSearch connector while maintaining independence from other connector modernization efforts.