Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Lucene, mail # dev - remove FieldsEnum?


Copy link to this message
-
remove FieldsEnum?
Robert Muir 2012-08-11, 13:27
FieldsEnum seems kinda awkward, can we just have something like
Iterable<String> on Fields?

so the consuming code i think would be easier.

for (String field : fields) {
  Terms terms = fields.terms(field);
  ...
}

I don't like that there are two ways to get the terms for a field
today, so there is duplicate logic or crazy
stuff to handle this Fields.terms(String) versus FieldsEnum.terms()

--
lucidimagination.com

---------------------------------------------------------------------