org.apache.lucene.search
Interface ExtendedFieldCache

All Superinterfaces:
FieldCache

public interface ExtendedFieldCache
extends FieldCache


Nested Class Summary
static interface ExtendedFieldCache.DoubleParser
           
static interface ExtendedFieldCache.LongParser
           
 
Nested classes/interfaces inherited from interface org.apache.lucene.search.FieldCache
FieldCache.ByteParser, FieldCache.FloatParser, FieldCache.IntParser, FieldCache.ShortParser, FieldCache.StringIndex
 
Field Summary
static ExtendedFieldCache EXT_DEFAULT
           
 
Fields inherited from interface org.apache.lucene.search.FieldCache
DEFAULT, STRING_INDEX
 
Method Summary
 double[] getDoubles(IndexReader reader, String field)
          Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] getDoubles(IndexReader reader, String field, ExtendedFieldCache.DoubleParser parser)
          Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] getLongs(IndexReader reader, String field)
          Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] getLongs(IndexReader reader, String field, ExtendedFieldCache.LongParser parser)
          Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 
Methods inherited from interface org.apache.lucene.search.FieldCache
getAuto, getBytes, getBytes, getCustom, getFloats, getFloats, getInts, getInts, getShorts, getShorts, getStringIndex, getStrings
 

Field Detail

EXT_DEFAULT

static final ExtendedFieldCache EXT_DEFAULT
Method Detail

getLongs

long[] getLongs(IndexReader reader,
                String field)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the longs.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getLongs

long[] getLongs(IndexReader reader,
                String field,
                ExtendedFieldCache.LongParser parser)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the longs.
parser - Computes integer for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getDoubles

double[] getDoubles(IndexReader reader,
                    String field)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the doubles.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getDoubles

double[] getDoubles(IndexReader reader,
                    String field,
                    ExtendedFieldCache.DoubleParser parser)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the doubles.
parser - Computes integer for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.