lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Q about FieldInfos constructor
Date Wed, 16 Apr 2003 02:41:51 GMT
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


Mime
View raw message