You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Otis Gospodnetic <ot...@yahoo.com> on 2003/04/16 04:41:51 UTC
Q about FieldInfos constructor
Hello,
Does anyone know what the purpose of this call to add method from
FieldInfos constructor? I'm wondering why a "" name is being passed in
the method argument.
FieldInfos() {
add("", false);
}
Relevant methods from the same class:
final void add(String name, boolean isIndexed) {
FieldInfo fi = fieldInfo(name);
if (fi == null)
addInternal(name, isIndexed);
else if (fi.isIndexed != isIndexed)
fi.isIndexed = true;
}
private final void addInternal(String name, boolean isIndexed) {
FieldInfo fi = new FieldInfo(name, isIndexed, byNumber.size());
byNumber.addElement(fi);
byName.put(name, fi);
}
...
final FieldInfo fieldInfo(String fieldName) {
return (FieldInfo)byName.get(fieldName);
}
Thanks,
Otis
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org