Hi,
I've used NumericField to store my "hour" field.
Example...
doc.add(new NumericField("hour").setIntValue(Integer.parseInt("12")));
Before I was using plain string Field and enumerating them with
TermEnum, which worked fine.
Now I'm using NumericField's I'm not sure how to port this enumeration code.
Any pointers?
This is the code I was using previously for plain Fields.
ArrayList hours = new ArrayList();
TermEnum termEnum = reader.terms( new Term( "hour", "" ) );
Term term = null;
while ( ( term = termEnum.term() ) != null ) {
if ( ! term.field().equals( "hour" ) )
break;
hours.add( (Integer)term.text() );
termEnum.next();
}
Thanks,
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail:
java-user-unsubscribe@luce...
For additional commands, e-mail:
java-user-help@luce...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.