lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <gol...@detego-software.de>
Subject Re: API cleanup for Field and future cleanup for IndexReader
Date Thu, 02 Sep 2004 09:03:53 GMT
Bernhard Messer wrote:
> hi all,
> 
> Daniel did a great job when cleaning up the Field class to make it more 
> readable for the user. Wouldn't it be the best time to clean up the 3 
> IndexReader methods which are directly related to field names ? 
> Currently there are 3 different methods available to get the field names 
> from an index.
> 
> a) getFieldNames();
> b) getFieldNames(boolean indexed);
> c) getIndexedFieldNames(boolean storedTermVector);
> 
> my proposal is to deprecate a), b) and c) and add one new method which 
> can handle all the possible options. The implementation could be similar 
> to the new Store, Index etc. implementation in Field class. Adding a 
> public static final class to IndexReader like:
> 
> public static final class FieldNames {
>    private String option;
>    private FieldNames() {}
>    private FieldNames(String option) {
>      this.option = option;
>    }
>    public String toString() {
>      return option;
>    }
>      public static final FieldNames ALL = new FieldNames ("ALL");
>    public static final FieldNames INDEXED = new FieldNames ("INDEXED");
>    ....
>  }
> 
> we would end up with a method like:
> 
> getFieldNames(FieldNames names);
> 
> any thoughts on it ?

+1
seems reasonable for me.


---------------------------------------------------------------------
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