|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.apache.lucene.index.FieldInfos
final class FieldInfos
Access to the Field Info file that describes document fields and whether or not they are indexed. Each segment has a separate Field Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
| Field Summary | |
|---|---|
private Hashtable |
byName
|
private Vector |
byNumber
|
| Constructor Summary | |
|---|---|
FieldInfos()
|
|
FieldInfos(Directory d,
String name)
Construct a FieldInfos object using the directory and the name of the file InputStream |
|
| Method Summary | |
|---|---|
void |
add(Collection names,
boolean isIndexed)
Assumes the field is not storing term vectors |
void |
add(Document doc)
Adds field info for a Document. |
void |
add(String name,
boolean isIndexed)
Calls three parameter add with false for the storeTermVector parameter |
void |
add(String name,
boolean isIndexed,
boolean storeTermVector)
If the field is not yet known, adds it. |
void |
addIndexed(Collection names,
boolean storeTermVectors)
|
private void |
addInternal(String name,
boolean isIndexed,
boolean storeTermVector)
|
FieldInfo |
fieldInfo(int fieldNumber)
|
FieldInfo |
fieldInfo(String fieldName)
|
String |
fieldName(int fieldNumber)
|
int |
fieldNumber(String fieldName)
|
boolean |
hasVectors()
|
private void |
read(InputStream input)
|
int |
size()
|
void |
write(Directory d,
String name)
|
void |
write(OutputStream output)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Vector byNumber
private Hashtable byName
| Constructor Detail |
|---|
FieldInfos()
FieldInfos(Directory d,
String name)
throws IOException
d - The directory to open the InputStream fromname - The name of the file to open the InputStream from in the Directory
IOExceptionread(gate.creole.annic.apache.lucene.store.InputStream)| Method Detail |
|---|
public void add(Document doc)
public void addIndexed(Collection names,
boolean storeTermVectors)
names - The names of the fieldsstoreTermVectors - Whether the fields store term vectors or not
public void add(Collection names,
boolean isIndexed)
names - The names of the fieldsisIndexed - Whether the fields are indexed or notadd(String, boolean)
public void add(String name,
boolean isIndexed)
name - The name of the FieldisIndexed - 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
private void addInternal(String name,
boolean isIndexed,
boolean storeTermVector)
public int fieldNumber(String fieldName)
public FieldInfo fieldInfo(String fieldName)
public String fieldName(int fieldNumber)
public FieldInfo fieldInfo(int fieldNumber)
public int size()
public boolean hasVectors()
public void write(Directory d,
String name)
throws IOException
IOException
public void write(OutputStream output)
throws IOException
IOException
private void read(InputStream input)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||