lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index FieldsReader.java
Date Fri, 03 Oct 2003 10:24:46 GMT
otis        2003/10/03 03:24:46

  Modified:    src/java/org/apache/lucene/index FieldsReader.java
  Log:
  - Fixed a bug when dealing with large indices
  - Added Javadoc.
  
  Revision  Changes    Path
  1.5       +9 -4      jakarta-lucene/src/java/org/apache/lucene/index/FieldsReader.java
  
  Index: FieldsReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/FieldsReader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FieldsReader.java	29 Jan 2003 17:18:54 -0000	1.4
  +++ FieldsReader.java	3 Oct 2003 10:24:46 -0000	1.5
  @@ -61,20 +61,25 @@
   import org.apache.lucene.document.Document;
   import org.apache.lucene.document.Field;
   
  +/**
  + * Class responsible for access to stored document fields.
  + * It uses <segment>.fdt and <segment>.fdx; files.
  + *
  + * @version $Id$
  + */
   final class FieldsReader {
     private FieldInfos fieldInfos;
     private InputStream fieldsStream;
     private InputStream indexStream;
     private int size;
   
  -  FieldsReader(Directory d, String segment, FieldInfos fn)
  -       throws IOException {
  +  FieldsReader(Directory d, String segment, FieldInfos fn) throws IOException {
       fieldInfos = fn;
   
       fieldsStream = d.openFile(segment + ".fdt");
       indexStream = d.openFile(segment + ".fdx");
   
  -    size = (int)indexStream.length() / 8;
  +    size = (int)(indexStream.length() / 8);
     }
   
     final void close() throws IOException {
  @@ -90,7 +95,7 @@
       indexStream.seek(n * 8L);
       long position = indexStream.readLong();
       fieldsStream.seek(position);
  -    
  +
       Document doc = new Document();
       int numFields = fieldsStream.readVInt();
       for (int i = 0; i < numFields; i++) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message