From 0cdce947635f72d5f74cf8232a40989a66153b73 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Wed, 8 Apr 2026 13:59:40 -0600 Subject: [PATCH] chore: remove retrieval depth for consistency with other SDKs for launch --- .../cloud/firestore/pipeline/stages/Search.java | 15 ++++++++------- .../google/cloud/firestore/PipelineProtoTest.java | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Search.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Search.java index a06d759de..2336e260e 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Search.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Search.java @@ -154,13 +154,14 @@ public Search withSort(Ordering order, Ordering... additionalOrderings) { // return new Search(options.with("limit", encodeValue(limit))); // } - /** - * Specify the maximum number of documents to retrieve. Documents will be retrieved in the - * pre-sort order specified by the search index. - */ - public Search withRetrievalDepth(long retrievalDepth) { - return new Search(options.with("retrieval_depth", encodeValue(retrievalDepth))); - } + // TODO(search) enable with backend support + // /** + // * Specify the maximum number of documents to retrieve. Documents will be retrieved in the + // * pre-sort order specified by the search index. + // */ + // public Search withRetrievalDepth(long retrievalDepth) { + // return new Search(options.with("retrieval_depth", encodeValue(retrievalDepth))); + // } // TODO(search) enable with backend support // /** Specify the number of documents to skip. */ diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/PipelineProtoTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/PipelineProtoTest.java index 42b647e84..4c02dc3fb 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/PipelineProtoTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/PipelineProtoTest.java @@ -46,7 +46,7 @@ public void testSearchStageProtoEncoding() { .search( Search.withQuery("foo") // .withLimit(1) - .withRetrievalDepth(2) + // .withRetrievalDepth(2) // .withOffset(3) // .withQueryEnhancement(Search.QueryEnhancement.REQUIRED) // .withLanguageCode("en-US") @@ -76,7 +76,7 @@ public void testSearchStageProtoEncoding() { // assertThat(optionsMap.get("limit").getIntegerValue()).isEqualTo(1L); // retrieval_depth - assertThat(optionsMap.get("retrieval_depth").getIntegerValue()).isEqualTo(2L); + // assertThat(optionsMap.get("retrieval_depth").getIntegerValue()).isEqualTo(2L); // offset // assertThat(optionsMap.get("offset").getIntegerValue()).isEqualTo(3L);