Skip to content

Commit 4d84830

Browse files
Query: Fixes default for the query plan optimization for Hybrid Search to be disabled (#5171)
## Description #5120 enabled the switch to ask for the optimized query plan by default. However, the pipeline support for the optimized query plan is in #5121. This will lead to exceptions in the hybrid search query pipeline in version 3.49.0 if the SDK talks to a newer gateway that can return the optimized query plan. To prevent this, we change this optimization to be disabled by default. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) Co-authored-by: Debdatta Kunda <[email protected]>
1 parent d3e98de commit 4d84830

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public ConsistencyLevel? ConsistencyLevel
208208

209209
internal FeedRange FeedRange { get; set; }
210210

211-
internal bool IsHybridSearchQueryPlanOptimizationDisabled { get; set; } = ConfigurationManager.IsHybridSearchQueryPlanOptimizationDisabled(defaultValue: false);
211+
internal bool IsHybridSearchQueryPlanOptimizationDisabled { get; set; } = ConfigurationManager.IsHybridSearchQueryPlanOptimizationDisabled(defaultValue: true);
212212

213213
// This is a temporary flag to enable the distributed query gateway mode.
214214
// This flag will be removed once we have a way for the client to determine

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/NonStreamingOrderByQueryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static async Task ImplementationAsync(Container container, IReadOnlyList<CosmosO
111111
MakeQueryFeaturesTest(
112112
environmentVariable: null,
113113
requestOption: null,
114-
expectHybridSearchOptimizationDisabled: false),
114+
expectHybridSearchOptimizationDisabled: true),
115115
MakeQueryFeaturesTest(
116116
environmentVariable: true,
117117
requestOption: null,

0 commit comments

Comments
 (0)