anshul98ks123 commented on code in PR #18317:
URL: https://github.com/apache/pinot/pull/18317#discussion_r3208534699


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/creator/VectorIndexConfig.java:
##########
@@ -90,7 +95,7 @@ public VectorIndexConfig(@JsonProperty("disabled") @Nullable 
Boolean disabled,
     _vectorDimension = vectorDimension;
     _version = version;
     _vectorDistanceFunction = vectorDistanceFunction;
-    _properties = properties;
+    _properties = properties != null ? properties : Collections.emptyMap();

Review Comment:
   Done



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/TextIndexConfig.java:
##########
@@ -338,6 +341,75 @@ public boolean isStoreInSegmentFile() {
     return _storeInSegmentFile;
   }
 
+  /**
+   * Curated slim serializer. See {@link IndexConfig#toJsonObject()} for the 
rationale.
+   *
+   * <p>Each of the 18 lucene defaults — declared as {@code 
LUCENE_INDEX_DEFAULT_*} constants at
+   * the top of this file — is omitted from the output when the field still 
equals its default.
+   * Empty / null lists for {@code stopWords*} and {@code 
luceneAnalyzerClassArgs*} are also
+   * treated as defaults and omitted.
+   */
+  @Override
+  @JsonValue
+  public ObjectNode toJsonObject() {
+    ObjectNode node = super.toJsonObject();
+    if (_rawValueForTextIndex != null) {
+      node.set("rawValue", JsonUtils.objectToJsonNode(_rawValueForTextIndex));
+    }
+    if (_enableQueryCache) {
+      node.put("queryCache", true);
+    }
+    if (_useANDForMultiTermQueries) {
+      node.put("useANDForMultiTermQueries", true);
+    }
+    if (_stopWordsInclude != null && !_stopWordsInclude.isEmpty()) {

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to