lnbest0707-uber commented on code in PR #13890: URL: https://github.com/apache/pinot/pull/13890#discussion_r1733441558
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/SchemaConformingTransformerV2.java: ########## @@ -439,18 +439,29 @@ private ExtraFieldsContainer processField(SchemaTreeNode parentNode, Deque<Strin public void generateTextIndexLuceneDocument(Map.Entry<String, Object> kv, List<String> indexDocuments, Integer mergedTextIndexDocumentMaxLength) { String key = kv.getKey(); - String val; // To avoid redundant leading and tailing '"', only convert to JSON string if the value is a list or an array if (kv.getValue() instanceof Collection || kv.getValue() instanceof Object[]) { + // Add the entire array or collection as one string to the Lucene doc. try { - val = JsonUtils.objectToString(kv.getValue()); + addLuceneDoc(indexDocuments, mergedTextIndexDocumentMaxLength, key, JsonUtils.objectToString(kv.getValue())); + // To enable array contains search, we also add each array element with the key value pair to the Lucene doc. + if (kv.getValue() instanceof Collection) { Review Comment: Here the comment is saying "array contains" but the code is only extracting from collection and ignoring array. What's our exact expectation here? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org