Skip to content

Commit f6698d6

Browse files
yiyupanclaude
andcommitted
Update javadoc to use @link tags for clickable references
Enhanced javadoc in SearchSourceBuilderProtoUtils to use @link tags instead of inline code references, making IDE navigation easier. Changes: - Aggregation parsing comments now use @link for SearchSourceBuilder and AggregatorFactories - DerivedField comment uses @link for DerivedFieldMapper.Builder#build() - ScriptField javadoc enhanced with proper @link and parameter descriptions Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
1 parent 13a01fb commit f6698d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/proto/request/search/SearchSourceBuilderProtoUtils.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,9 @@ private static void parseNonQueryFields(
171171
}
172172

173173
// Parse aggregations from protobuf
174-
// Similar to REST API parsing in SearchSourceBuilder.parseXContent()
175-
// REST side: aggregations = AggregatorFactories.parseAggregators(parser)
174+
// Similar to REST API parsing in {@link org.opensearch.search.builder.SearchSourceBuilder#parseXContent(XContentParser, boolean)}
175+
// REST side: aggregations = {@link org.opensearch.search.aggregations.AggregatorFactories#parseAggregators(XContentParser)}
176176
// Proto side: We parse from the protobuf AggregationContainer map
177-
// @see org.opensearch.search.builder.SearchSourceBuilder#parseXContent(XContentParser, boolean)
178-
// @see org.opensearch.search.aggregations.AggregatorFactories#parseAggregators(XContentParser)
179177
//
180178
// Note: In REST API, "aggregations" and "aggs" are aliases for the same JSON field.
181179
// In protobuf, we only have the "aggregations" field (field 36).
@@ -223,7 +221,7 @@ private static void parseNonQueryFields(
223221
DerivedField derivedFieldProto = entry.getValue();
224222

225223
// Convert protobuf DerivedField to OpenSearch DerivedField using the REST side pattern
226-
// This uses simple constructor + conditional setters (matches DerivedFieldMapper.Builder.build())
224+
// This uses simple constructor + conditional setters (matches {@link org.opensearch.index.mapper.DerivedFieldMapper.Builder#build()})
227225
org.opensearch.index.mapper.DerivedField derivedField = DerivedFieldProtoUtils.fromProto(name, derivedFieldProto);
228226

229227
// Add to SearchSourceBuilder - check if any optional fields are set to choose the right method
@@ -286,10 +284,12 @@ private ScriptFieldProtoUtils() {
286284
}
287285

288286
/**
289-
* Similar to {@link SearchSourceBuilder.ScriptField#ScriptField(XContentParser)}
287+
* Converts a protobuf ScriptField to a {@link org.opensearch.search.builder.SearchSourceBuilder.ScriptField}.
288+
* Similar to {@link org.opensearch.search.builder.SearchSourceBuilder.ScriptField#ScriptField(XContentParser)}
290289
*
291-
* @param scriptFieldName
292-
* @param scriptFieldProto
290+
* @param scriptFieldName The name of the script field
291+
* @param scriptFieldProto The protobuf ScriptField message
292+
* @return A SearchSourceBuilder.ScriptField instance
293293
* @throws IOException if there's an error during parsing
294294
*/
295295

0 commit comments

Comments
 (0)