Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
final class: SegmentInfo [javadoc | source]
java.lang.Object
   org.apache.lucene.index.SegmentInfo
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Field Summary
static final  int NO     
static final  int YES     
static final  int CHECK_DIR     
static final  int WITHOUT_GEN     
public  String name     
public  int docCount     
public  Directory dir     
 long sizeInBytes     
Constructor:
 public SegmentInfo(String name,
    int docCount,
    Directory dir) 
 SegmentInfo(Directory dir,
    int format,
    IndexInput input) throws IOException 
    Construct a new SegmentInfo instance by reading a previously saved SegmentInfo from input.
    Parameters:
    dir - directory to load from
    format - format of the segments info file
    input - input handle to read segment info from
 public SegmentInfo(String name,
    int docCount,
    Directory dir,
    boolean isCompoundFile,
    boolean hasSingleNormFile) 
 public SegmentInfo(String name,
    int docCount,
    Directory dir,
    boolean isCompoundFile,
    boolean hasSingleNormFile,
    int docStoreOffset,
    String docStoreSegment,
    boolean docStoreIsCompoundFile) 
Method from org.apache.lucene.index.SegmentInfo Summary:
advanceDelGen,   advanceNormGen,   clearDelGen,   clone,   equals,   files,   getDelFileName,   getDocStoreIsCompoundFile,   getDocStoreOffset,   getDocStoreSegment,   getNormFileName,   getUseCompoundFile,   hasDeletions,   hasSeparateNorms,   hasSeparateNorms,   hashCode,   reset,   segString,   setDocStoreIsCompoundFile,   setDocStoreOffset,   setNumFields,   setUseCompoundFile,   sizeInBytes,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.SegmentInfo Detail:
  void advanceDelGen() 
  void advanceNormGen(int fieldIndex) 
    Increment the generation count for the norms file for this field.
  void clearDelGen() 
 public Object clone() 
 public boolean equals(Object obj) 
    We consider another SegmentInfo instance equal if it has the same dir and same name.
 public List files() throws IOException 
 String getDelFileName() 
 boolean getDocStoreIsCompoundFile() 
 int getDocStoreOffset() 
 String getDocStoreSegment() 
 String getNormFileName(int number) throws IOException 
    Get the file name for the norms file for this field.
 boolean getUseCompoundFile() throws IOException 
    Returns true if this segment is stored as a compound file; else, false.
 boolean hasDeletions() throws IOException 
 boolean hasSeparateNorms() throws IOException 
    Returns true if any fields in this segment have separate norms.
 boolean hasSeparateNorms(int fieldNumber) throws IOException 
    Returns true if this field for this segment has saved a separate norms file (__N.sX).
 public int hashCode() 
  void reset(SegmentInfo src) 
    Copy everything from src SegmentInfo into our instance.
 public String segString(Directory dir) 
    Used for debugging
  void setDocStoreIsCompoundFile(boolean v) 
  void setDocStoreOffset(int offset) 
  void setNumFields(int numFields) 
  void setUseCompoundFile(boolean isCompoundFile) 
    Mark whether this segment is stored as a compound file.
 long sizeInBytes() throws IOException 
    Returns total size in bytes of all of files used by this segment.
  void write(IndexOutput output) throws IOException 
    Save this segment's info.