@@ -119,24 +119,24 @@ public Search withAddFields(Selectable field, Selectable... additionalFields) {
119119 return new Search (options .with ("add_fields" , encodeValue (map )));
120120 }
121121
122- // TODO(search) enable with backend support
123- // /** Specify the fields to keep or add to each document. */
124- // public Search withSelect(Selectable selection, Object... additionalSelections) {
125- // Selectable[] allSelections = new Selectable[additionalSelections.length + 1];
126- // allSelections[0] = selection;
127- // for (int i = 0; i < additionalSelections.length; i++) {
128- // allSelections[i + 1] = Selectable.toSelectable(additionalSelections[i]);
129- // }
130- // Map<String, Value> map =
131- // PipelineUtils.selectablesToMap(allSelections).entrySet().stream()
132- // .collect(Collectors.toMap(Map.Entry::getKey, e -> encodeValue(e.getValue())));
133- // return new Search(options.with("select", encodeValue(map)));
134- // }
135-
136- // /** Specify the fields to keep or add to each document. */
137- // public Search withSelect(String fieldName, Object... additionalSelections) {
138- // return withSelect(field(fieldName), additionalSelections);
139- // }
122+ // TODO(search) enable with backend support
123+ // /** Specify the fields to keep or add to each document. */
124+ // public Search withSelect(Selectable selection, Object... additionalSelections) {
125+ // Selectable[] allSelections = new Selectable[additionalSelections.length + 1];
126+ // allSelections[0] = selection;
127+ // for (int i = 0; i < additionalSelections.length; i++) {
128+ // allSelections[i + 1] = Selectable.toSelectable(additionalSelections[i]);
129+ // }
130+ // Map<String, Value> map =
131+ // PipelineUtils.selectablesToMap(allSelections).entrySet().stream()
132+ // .collect(Collectors.toMap(Map.Entry::getKey, e -> encodeValue(e.getValue())));
133+ // return new Search(options.with("select", encodeValue(map)));
134+ // }
135+
136+ // /** Specify the fields to keep or add to each document. */
137+ // public Search withSelect(String fieldName, Object... additionalSelections) {
138+ // return withSelect(field(fieldName), additionalSelections);
139+ // }
140140
141141 /** Specify how the returned documents are sorted. One or more ordering are required. */
142142 public Search withSort (Ordering order , Ordering ... additionalOrderings ) {
@@ -147,11 +147,11 @@ public Search withSort(Ordering order, Ordering... additionalOrderings) {
147147 options .with ("sort" , Lists .transform (Arrays .asList (allOrderings ), Ordering ::toProto )));
148148 }
149149
150- // TODO(search) enable with backend support
151- // /** Specify the maximum number of documents to return from the Search stage. */
152- // public Search withLimit(long limit) {
153- // return new Search(options.with("limit", encodeValue(limit)));
154- // }
150+ // TODO(search) enable with backend support
151+ // /** Specify the maximum number of documents to return from the Search stage. */
152+ // public Search withLimit(long limit) {
153+ // return new Search(options.with("limit", encodeValue(limit)));
154+ // }
155155
156156 /**
157157 * Specify the maximum number of documents to retrieve. Documents will be retrieved in the
@@ -162,25 +162,27 @@ public Search withRetrievalDepth(long retrievalDepth) {
162162 }
163163
164164 // TODO(search) enable with backend support
165- // /** Specify the number of documents to skip. */
166- // public Search withOffset(long offset) {
167- // return new Search(options.with("offset", encodeValue(offset)));
168- // }
169-
170- // TODO(search) enable with backend support
171- // /** Specify the BCP-47 language code of text in the search query, such as, “en-US” or “sr-Latn” */
172- // public Search withLanguageCode(String value) {
173- // return new Search(options.with("language_code", encodeValue(value)));
174- // }
165+ // /** Specify the number of documents to skip. */
166+ // public Search withOffset(long offset) {
167+ // return new Search(options.with("offset", encodeValue(offset)));
168+ // }
169+
170+ // TODO(search) enable with backend support
171+ // /** Specify the BCP-47 language code of text in the search query, such as, “en-US” or
172+ // “sr-Latn” */
173+ // public Search withLanguageCode(String value) {
174+ // return new Search(options.with("language_code", encodeValue(value)));
175+ // }
175176
176177 // TODO(search) enable with backend support
177- // /**
178- // * Specify the query expansion behavior used by full-text search expressions in this search stage.
179- // * Default: {@code .PREFERRED}
180- // */
181- // public Search withQueryEnhancement(QueryEnhancement queryEnhancement) {
182- // return new Search(options.with("query_enhancement", queryEnhancement.toProto()));
183- // }
178+ // /**
179+ // * Specify the query expansion behavior used by full-text search expressions in this search
180+ // stage.
181+ // * Default: {@code .PREFERRED}
182+ // */
183+ // public Search withQueryEnhancement(QueryEnhancement queryEnhancement) {
184+ // return new Search(options.with("query_enhancement", queryEnhancement.toProto()));
185+ // }
184186
185187 @ Override
186188 Iterable <Value > toStageArgs () {
0 commit comments