Package org.apache.lucene.store

Examples of org.apache.lucene.store.IndexInput.readLong()


  @Override
  public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {

    final String seedFileName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, SEED_EXT);
    final IndexInput in = state.directory.openInput(seedFileName, state.context);
    final long seed = in.readLong();
    if (LuceneTestCase.VERBOSE) {
      System.out.println("MockRandomCodec: reading from seg=" + state.segmentInfo.name + " formatID=" + state.segmentSuffix + " seed=" + seed);
    }
    in.close();
View Full Code Here


      String quickTisTxt=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION_QUICK_TXT);
      String quickTisVal=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION_QUICK_VAL);
      if(directory.fileExists(tisFileSize))
      {
      IndexInput sizebuff=directory.openInput(tisFileSize, readBufferSize);
      tisfilesize=sizebuff.readLong();
         
      if(directory.fileExists(quickTis))
      {
       docValues=new DocValuesReader()
      
View Full Code Here

    long tiifilesize=-1;
          String tiiFileSize=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_INDEX_EXTENSION_SIZE);
          if(directory.fileExists(tiiFileSize))
          {
          IndexInput sizebuff=directory.openInput(tiiFileSize, readBufferSize);
          tiifilesize=sizebuff.readLong();
          sizebuff.close();
          }
        // Load terms index
        totalIndexInterval = origEnum.indexInterval * indexDivisor;
         SegmentTermEnum indexEnum=null ;
View Full Code Here

     
      pos = new HashMap<Long, Long>();
      IndexInput streampos = dir.openInput(fileNamepos, readBufferSize);
      int size = streampos.readInt();
      for (int i = 0; i < size; i++) {
  Long key = streampos.readLong();
  Long value = streampos.readLong();
  pos.put(key, value);
      }

      streampos.close();
View Full Code Here

      pos = new HashMap<Long, Long>();
      IndexInput streampos = dir.openInput(fileNamepos, readBufferSize);
      int size = streampos.readInt();
      for (int i = 0; i < size; i++) {
  Long key = streampos.readLong();
  Long value = streampos.readLong();
  pos.put(key, value);
      }

      streampos.close();
     
View Full Code Here

    boolean isusechecksumfile=false;
    long checksum=-1;
    if(directory.fileExists(checksumfile))
    {
        IndexInput chkinput=directory.openInput(checksumfile);
        checksum=chkinput.readLong();
        chkinput.close();
        isusechecksumfile=true;
    }else{
  System.out.println("can`t found checksum file "+checksumfile);
    }
View Full Code Here

 
            if (genInput != null) {
              try {
                int version = genInput.readInt();
                if (version == FORMAT_LOCKLESS) {
                  long gen0 = genInput.readLong();
                  long gen1 = genInput.readLong();
                  if (infoStream != null) {
                    message("fallback check: " + gen0 + "; " + gen1);
                  }
                  if (gen0 == gen1) {
View Full Code Here

            if (genInput != null) {
              try {
                int version = genInput.readInt();
                if (version == FORMAT_LOCKLESS) {
                  long gen0 = genInput.readLong();
                  long gen1 = genInput.readLong();
                  if (infoStream != null) {
                    message("fallback check: " + gen0 + "; " + gen1);
                  }
                  if (gen0 == gen1) {
                    // The file is consistent.
View Full Code Here

          try {
            format = input.readInt();
            if(format < 0){
              if (format < CURRENT_FORMAT)
                throw new CorruptIndexException("Unknown format version: " + format);
              version = input.readLong(); // read version
            }
          }
          finally {
            input.close();
          }
View Full Code Here

 
            if (genInput != null) {
              try {
                int version = genInput.readInt();
                if (version == FORMAT_LOCKLESS) {
                  long gen0 = genInput.readLong();
                  long gen1 = genInput.readLong();
                  message("fallback check: " + gen0 + "; " + gen1);
                  if (gen0 == gen1) {
                    // The file is consistent.
                    genB = gen0;
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.