/** * Constructs an instance of the class with * the given index, using the specified structure name. * @param index The index to be used * @param structureName the name of this direct index * @throws IOException */ public DirectIndex(IndexOnDisk index, String structureName) throws IOException { super(index, structureName, BasicIterablePosting.class); docIndex = index.getDocumentIndex(); }
/** * Constructs an instance of the class with * the given index, using the specified structure name. * @param index The index to be used * @param structureName the name of this direct index * @throws IOException */ public DirectIndex(IndexOnDisk index, String structureName) throws IOException { super(index, structureName, BasicIterablePosting.class); docIndex = index.getDocumentIndex(); }
/** * Constructs an instance of the class with * @param index * @param structureName * @throws IOException */ public BlockInvertedIndex(IndexOnDisk index, String structureName) throws IOException { this(index, structureName, index.getDocumentIndex()); }
/** * Constructs an instance of the class with * @param index * @param structureName * @param postingClass * @throws IOException */ public DirectIndex(IndexOnDisk index, String structureName, Class<? extends IterablePosting> postingClass) throws IOException { super(index, structureName, postingClass); docIndex = index.getDocumentIndex(); }
/** * Constructs an instance of the class with * @param index * @param structureName * @param postingClass * @throws IOException */ public DirectIndex(IndexOnDisk index, String structureName, Class<? extends IterablePosting> postingClass) throws IOException { super(index, structureName, postingClass); docIndex = index.getDocumentIndex(); }
/** * Construct an instance of the class with * @param index * @param structureName * @throws IOException */ public InvertedIndex(IndexOnDisk index, String structureName) throws IOException { this(index, structureName, index.getDocumentIndex()); } /**
/** * Constructs an instance of the class with * @param index * @param structureName * @throws IOException */ public BlockInvertedIndex(IndexOnDisk index, String structureName) throws IOException { this(index, structureName, index.getDocumentIndex()); }
/** * Construct an instance of the class with * @param index * @param structureName * @throws IOException */ public InvertedIndex(IndexOnDisk index, String structureName) throws IOException { this(index, structureName, index.getDocumentIndex()); } /**
/** * main * @param args * @throws Exception */ public static void main (String args[]) throws Exception { IndexOnDisk index = Index.createIndex(); if (index == null) { System.err.println("Couldn't load index: " + Index.getLastIndexLoadError()); return; } PostingIndex<Pointer> direct = (PostingIndex<Pointer>) index.getDirectIndex(); DocumentIndex doc = index.getDocumentIndex(); DocumentIndexEntry die = doc.getDocumentEntry(Integer.parseInt(args[0])); System.err.println("docid" + args[0] + " pointer = "+ die.toString()); IterablePosting pi = direct.getPostings(die); System.out.print(args[0] + " "); while(pi.next() != IterablePosting.EOL) { System.out.print("(" + pi.getId() + ", " + pi.getFrequency() + ") "); } System.out.println(); }
this.doi = _index.getDocumentIndex(); this.structureName = _structureName; fileCount = Byte.parseByte(_index.getIndexProperty("index."+structureName+".data-files", "1"));
this.doi = _index.getDocumentIndex(); this.structureName = _structureName; fileCount = Byte.parseByte(_index.getIndexProperty("index."+structureName+".data-files", "1"));
/** * main * @param args * @throws Exception */ public static void main (String args[]) throws Exception { IndexOnDisk index = Index.createIndex(); if (index == null) { System.err.println("Couldn't load index: " + Index.getLastIndexLoadError()); return; } PostingIndex<Pointer> direct = (PostingIndex<Pointer>) index.getDirectIndex(); DocumentIndex doc = index.getDocumentIndex(); DocumentIndexEntry die = doc.getDocumentEntry(Integer.parseInt(args[0])); System.err.println("docid" + args[0] + " pointer = "+ die.toString()); IterablePosting pi = direct.getPostings(die); System.out.print(args[0] + " "); while(pi.next() != IterablePosting.EOL) { System.out.print("(" + pi.getId() + ", " + pi.getFrequency() + ") "); } System.out.println(); }
/** * 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; }
inverted = new MemoryInvertedIndex(lexicon, superIndex.getDocumentIndex()); stats = new MemoryCollectionStatistics(0, 0, 0, 0, new long[] {});
this.documentIndex = _index.getDocumentIndex(); this.structureName = _structureName; fileCount = Byte.parseByte(_index.getIndexProperty("index."
this.documentIndex = _index.getDocumentIndex(); this.structureName = _structureName; fileCount = Byte.parseByte(_index.getIndexProperty("index."
this.documentIndex = index.getDocumentIndex();
this.documentIndex = index.getDocumentIndex();