Package org.apache.lucene.index.MultiDocValues

Examples of org.apache.lucene.index.MultiDocValues.OrdinalMap.ramBytesUsed()


    DirectoryReader r = iw.getReader();
    AtomicReader ar = SlowCompositeReaderWrapper.wrap(r);
    SortedDocValues sdv = ar.getSortedDocValues("sdv");
    if (sdv instanceof MultiSortedDocValues) {
      OrdinalMap map = ((MultiSortedDocValues) sdv).mapping;
      assertEquals(RamUsageTester.sizeOf(map, ORDINAL_MAP_ACCUMULATOR), map.ramBytesUsed());
    }
    SortedSetDocValues ssdv = ar.getSortedSetDocValues("ssdv");
    if (ssdv instanceof MultiSortedSetDocValues) {
      OrdinalMap map = ((MultiSortedSetDocValues) ssdv).mapping;
      assertEquals(RamUsageTester.sizeOf(map, ORDINAL_MAP_ACCUMULATOR), map.ramBytesUsed());
View Full Code Here


      assertEquals(RamUsageTester.sizeOf(map, ORDINAL_MAP_ACCUMULATOR), map.ramBytesUsed());
    }
    SortedSetDocValues ssdv = ar.getSortedSetDocValues("ssdv");
    if (ssdv instanceof MultiSortedSetDocValues) {
      OrdinalMap map = ((MultiSortedSetDocValues) ssdv).mapping;
      assertEquals(RamUsageTester.sizeOf(map, ORDINAL_MAP_ACCUMULATOR), map.ramBytesUsed());
    }
    iw.close();
    r.close();
    dir.close();
  }
View Full Code Here

        final Map<String, SortedDocValues>[] global = new Map[indexReader.leaves().size()];
        for (Map.Entry<String, SortedDocValues[]> entry : types.entrySet()) {
            final String parentType = entry.getKey();
            final SortedDocValues[] values = entry.getValue();
            final OrdinalMap ordinalMap = OrdinalMap.build(null, entry.getValue(), PackedInts.DEFAULT);
            ramBytesUsed += ordinalMap.ramBytesUsed();
            for (int i = 0; i < values.length; ++i) {
                final SortedDocValues segmentValues = values[i];
                final LongValues globalOrds = ordinalMap.getGlobalOrds(i);
                final SortedDocValues globalSortedValues = new SortedDocValues() {
                    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.