/** * Constructs an instance of the class with * @param _index * @param structureName * @throws IOException */ public InputStream(IndexOnDisk _index, String structureName) throws IOException { this(_index, structureName, 0, -1 + _index.getIntIndexProperty("index."+structureName+".entries", 0)); } /**
/** * Constructs an instance of the class with * @param _index * @param structureName * @throws IOException */ public InputStream(IndexOnDisk _index, String structureName) throws IOException { this(_index, structureName, 0, -1 + _index.getIntIndexProperty("index."+structureName+".entries", 0)); } /**
/** Construct a new instance of this builder class */ public Inverted2DirectIndexBuilder(IndexOnDisk i) { this.index = i; fieldCount = index.getIntIndexProperty("index."+sourceStructure+".fields.count", 0); saveTagInformation = fieldCount > 0; }
/** * constructor * @param _srcIndex1 * @param _srcIndex2 * @param _destIndex */ public BlockStructureMerger(IndexOnDisk _srcIndex1, IndexOnDisk _srcIndex2, IndexOnDisk _destIndex) { super(_srcIndex1, _srcIndex2, _destIndex); String[] fieldNames = ArrayUtils.parseCommaDelimitedString(srcIndex1.getIndexProperty("index.inverted.fields.names", "")); int blocks = srcIndex1.getIntIndexProperty("index.inverted.blocks", 1); int maxblocks = srcIndex1.getIntIndexProperty("index.inverted.blocks.max", ApplicationSetup.MAX_BLOCKS); compressionDirectConfig = CompressionFactory.getCompressionConfiguration("direct", fieldNames, blocks, maxblocks); compressionInvertedConfig = CompressionFactory.getCompressionConfiguration("inverted", fieldNames, blocks, maxblocks); }
/** * constructor * @param _srcIndex1 * @param _srcIndex2 * @param _destIndex */ public StructureMerger(IndexOnDisk _srcIndex1, IndexOnDisk _srcIndex2, IndexOnDisk _destIndex) { this.srcIndex1 = _srcIndex1; this.srcIndex2 = _srcIndex2; this.destIndex = _destIndex; numberOfDocuments = 0; numberOfPointers = 0; numberOfTerms = 0; final int srcFieldCount1 = srcIndex1.getIntIndexProperty("index.inverted.fields.count", 0); final int srcFieldCount2 = srcIndex2.getIntIndexProperty("index.inverted.fields.count", 0); if (srcFieldCount1 != srcFieldCount2) { throw new Error("FieldCounts in source indices must match"); } String[] fieldNames = ArrayUtils.parseCommaDelimitedString(srcIndex1.getIndexProperty("index.inverted.fields.names", "")); assert srcFieldCount1 == fieldNames.length; fieldCount = srcFieldCount1; compressionDirectConfig = CompressionFactory.getCompressionConfiguration("direct", fieldNames, 0,0); compressionInvertedConfig = CompressionFactory.getCompressionConfiguration("inverted", fieldNames, 0,0); }
pointerList = _pointerList; postingIteratorClass = _postingIteratorClass; fieldCount = _index.getIntIndexProperty("index."+structureName+".fields.count", currentFile = 0); try{ postingConstructor = fieldCount > 0
/** * Constructs an instance of the BitPostingIndex. * @param _index * @param _structureName * @param _documentIndex * @param _postingImplementation * @throws IOException */ public BitPostingIndex( IndexOnDisk _index, String _structureName, DocumentIndex _documentIndex, Class<? extends IterablePosting> _postingImplementation) throws IOException { this( _index.getPath() + "/" + _index.getPrefix() + "." + _structureName + BitIn.USUAL_EXTENSION, Byte.parseByte(_index.getIndexProperty("index."+_structureName+".data-files", "1")), _documentIndex, _postingImplementation, _index.getIndexProperty("index."+_structureName+".data-source", "file"), _index.getIntIndexProperty("index."+_structureName+".fields.count", 0)); index = _index; }
pointerList = _pointerList; postingIteratorClass = _postingIteratorClass; fieldCount = _index.getIntIndexProperty("index."+structureName+".fields.count", currentFile = 0); try{ postingConstructor = fieldCount > 0
if (structureName.contains("lexicon")) int fieldCount = index.getIntIndexProperty("index.inverted.fields.count", 0); if (fieldCount > 0)
/** * Constructs an instance of the BitPostingIndex. * @param _index * @param _structureName * @param _documentIndex * @param _postingImplementation * @throws IOException */ public BitPostingIndex( IndexOnDisk _index, String _structureName, DocumentIndex _documentIndex, Class<? extends IterablePosting> _postingImplementation) throws IOException { this( _index.getPath() + "/" + _index.getPrefix() + "." + _structureName + BitIn.USUAL_EXTENSION, Byte.parseByte(_index.getIndexProperty("index."+_structureName+".data-files", "1")), _documentIndex, _postingImplementation, _index.getIndexProperty("index."+_structureName+".data-source", "file"), _index.getIntIndexProperty("index."+_structureName+".fields.count", 0)); index = _index; }
openFile(structureName); this.fieldsCount = index.getIntIndexProperty("index." + structureName + ".fields.count", 0); this.hasBlocks = index.getIntIndexProperty( "index." + structureName + ".blocks", 0); this.maxBlocks = index.getIntIndexProperty( "index." + structureName + ".blocks.max", ApplicationSetup.MAX_BLOCKS); this.chunkSize = index.getIntIndexProperty(compressionPrefix + ".chunk-size", -1);
openFile(structureName); this.fieldsCount = index.getIntIndexProperty("index." + structureName + ".fields.count", 0); this.hasBlocks = index.getIntIndexProperty( "index." + structureName + ".blocks", 0); this.maxBlocks = index.getIntIndexProperty( "index." + structureName + ".blocks.max", ApplicationSetup.MAX_BLOCKS); this.chunkSize = index.getIntIndexProperty(compressionPrefix + ".chunk-size", -1);
/** * Constructs an instance of the BitPostingIndex. * @param _index * @param _structureName * @param _postingImplementation * @throws IOException */ public BitPostingIndex( IndexOnDisk _index, String _structureName, Class<? extends IterablePosting> _postingImplementation) throws IOException { this( _index.getPath() + "/" + _index.getPrefix() + "." + _structureName + BitIn.USUAL_EXTENSION, Byte.parseByte(_index.getIndexProperty("index."+_structureName+".data-files", "1")), _index.getDocumentIndex(), _postingImplementation, _index.getIndexProperty("index."+_structureName+".data-source", "file"), _index.getIntIndexProperty("index."+_structureName+".fields.count", 0)); index = _index; }
/** * Constructs an instance of the BitPostingIndex. * @param _index * @param _structureName * @param _postingImplementation * @throws IOException */ public BitPostingIndex( IndexOnDisk _index, String _structureName, Class<? extends IterablePosting> _postingImplementation) throws IOException { this( _index.getPath() + "/" + _index.getPrefix() + "." + _structureName + BitIn.USUAL_EXTENSION, Byte.parseByte(_index.getIndexProperty("index."+_structureName+".data-files", "1")), _index.getDocumentIndex(), _postingImplementation, _index.getIndexProperty("index."+_structureName+".data-source", "file"), _index.getIntIndexProperty("index."+_structureName+".fields.count", 0)); index = _index; }
fieldsCount = _index.getIntIndexProperty("index." + structureName + ".fields.count", 0); hasBlocks = index.getIntIndexProperty("index." + structureName + ".blocks", 0); maxBlocks = index.getIntIndexProperty("index." + structureName + ".blocks.max", ApplicationSetup.MAX_BLOCKS); chunkSize = index.getIntIndexProperty( compressionPrefix + ".chunk-size", -1); assert chunkSize != -1;
fieldsCount = _index.getIntIndexProperty("index." + structureName + ".fields.count", 0); hasBlocks = index.getIntIndexProperty("index." + structureName + ".blocks", 0); maxBlocks = index.getIntIndexProperty("index." + structureName + ".blocks.max", ApplicationSetup.MAX_BLOCKS); chunkSize = index.getIntIndexProperty( compressionPrefix + ".chunk-size", -1); assert chunkSize != -1;
compressionLevel = _index.getIntIndexProperty("index."+_structureName+".compression-level", 5); numberOfRecords = _index.getIntIndexProperty("index."+_structureName+".entries", 0);
final Iterator<String[]> metaInput1 = (Iterator<String[]>)srcIndex1.getIndexStructureInputStream("meta"); int srcFieldCount1 = srcIndex1.getIntIndexProperty("index.inverted.fields.count", 0); int srcFieldCount2 = srcIndex2.getIntIndexProperty("index.inverted.fields.count", 0); if (srcFieldCount1 != srcFieldCount2)
index.getIntIndexProperty("index.inverted.blocks", 0), index.getIntIndexProperty("index.inverted.blocks.max", 0)); logger.info("Recompressing inverted structure using " + compressionConfig.toString());
index.getIntIndexProperty("index.inverted.blocks", 0), index.getIntIndexProperty("index.inverted.blocks.max", 0)); logger.info("Recompressing inverted structure using " + compressionConfig.toString());