|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.index.FieldInfos
public final class FieldInfos
Collection of FieldInfos (accessible by number or by name).
| Field Summary | |
|---|---|
static int |
FORMAT_OMIT_POSITIONS
|
static int |
FORMAT_PRE
|
static int |
FORMAT_START
|
| Constructor Summary | |
|---|---|
FieldInfos()
|
|
FieldInfos(Directory d,
String name)
Construct a FieldInfos object using the directory and the name of the file IndexInput |
|
| Method Summary | |
|---|---|
void |
add(Document doc)
Adds field info for a Document. |
FieldInfo |
add(FieldInfo fi)
|
void |
add(FieldInfos other)
|
void |
add(String name,
boolean isIndexed)
Calls 5 parameter add with false for all TermVector parameters. |
void |
add(String name,
boolean isIndexed,
boolean storeTermVector)
Calls 5 parameter add with false for term vector positions and offsets. |
void |
add(String name,
boolean isIndexed,
boolean storeTermVector,
boolean omitNorms)
If the field is not yet known, adds it. |
FieldInfo |
add(String name,
boolean isIndexed,
boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
FieldInfo.IndexOptions indexOptions)
If the field is not yet known, adds it. |
Object |
clone()
Returns a deep clone of this FieldInfos instance. |
FieldInfo |
fieldInfo(int fieldNumber)
Return the fieldinfo object referenced by the fieldNumber. |
FieldInfo |
fieldInfo(String fieldName)
|
String |
fieldName(int fieldNumber)
Return the fieldName identified by its number. |
int |
fieldNumber(String fieldName)
lookup the number of a field by name. |
boolean |
hasProx()
Returns true if any fields do not omitTermFreqAndPositions |
boolean |
hasVectors()
|
Iterator<FieldInfo> |
iterator()
|
int |
size()
|
void |
write(Directory d,
String name)
|
void |
write(IndexOutput output)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FORMAT_PRE
public static final int FORMAT_START
public static final int FORMAT_OMIT_POSITIONS
| Constructor Detail |
|---|
public FieldInfos()
public FieldInfos(Directory d,
String name)
throws IOException
d - The directory to open the IndexInput fromname - The name of the file to open the IndexInput from in the Directory
IOException| Method Detail |
|---|
public void add(FieldInfos other)
public Object clone()
clone in class Objectpublic void add(Document doc)
public boolean hasProx()
public void add(String name,
boolean isIndexed)
name - The name of the FieldableisIndexed - true if the field is indexedadd(String, boolean, boolean)
public void add(String name,
boolean isIndexed,
boolean storeTermVector)
name - The name of the fieldisIndexed - true if the field is indexedstoreTermVector - true if the term vector should be stored
public void add(String name,
boolean isIndexed,
boolean storeTermVector,
boolean omitNorms)
name - The name of the fieldisIndexed - true if the field is indexedstoreTermVector - true if the term vector should be storedomitNorms - true if the norms for the indexed field should be omitted
public FieldInfo add(String name,
boolean isIndexed,
boolean storeTermVector,
boolean omitNorms,
boolean storePayloads,
FieldInfo.IndexOptions indexOptions)
name - The name of the fieldisIndexed - true if the field is indexedstoreTermVector - true if the term vector should be storedomitNorms - true if the norms for the indexed field should be omittedstorePayloads - true if payloads should be stored for this fieldindexOptions - if term freqs should be omitted for this fieldpublic FieldInfo add(FieldInfo fi)
public int fieldNumber(String fieldName)
fieldName - field's name
public FieldInfo fieldInfo(String fieldName)
public String fieldName(int fieldNumber)
fieldNumber -
public FieldInfo fieldInfo(int fieldNumber)
fieldNumber -
public Iterator<FieldInfo> iterator()
iterator in interface Iterable<FieldInfo>public int size()
public boolean hasVectors()
public void write(Directory d,
String name)
throws IOException
IOException
public void write(IndexOutput output)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||