kishoreg commented on a change in pull request #4993: Support Text Search (both offline and realtime) URL: https://github.com/apache/incubator-pinot/pull/4993#discussion_r367718277
########## File path: pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java ########## @@ -418,28 +474,35 @@ private void addForwardIndex(GenericRow row, int docId, Map<String, Object> dict } } } else { + // MV column: always dictionary encoded int[] dictIds = (int[]) dictIdMap.get(column); ((FixedByteSingleColumnMultiValueReaderWriter) _indexReaderWriterMap.get(column)).setIntArray(docId, dictIds); } } } - private void addInvertedIndex(int docId, Map<String, Object> dictIdMap) { + private void addInvertedIndex(GenericRow row, int docId, Map<String, Object> dictIdMap) { // Update inverted index at last // NOTE: inverted index have to be updated at last because once it gets updated, the latest record will become // queryable for (FieldSpec fieldSpec : _physicalFieldSpecs) { String column = fieldSpec.getName(); - RealtimeInvertedIndexReader invertedIndex = _invertedIndexMap.get(column); + InvertedIndexReader invertedIndex = _invertedIndexMap.get(column); if (invertedIndex != null) { - if (fieldSpec.isSingleValueField()) { - invertedIndex.add(((Integer) dictIdMap.get(column)), docId); + if (invertedIndex instanceof RealtimeLuceneTextIndexReader) { Review comment: what cant we pass the row to old interface and let the implementation use it or ignore it ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org