Can you give an example of the output?
What does out.print() do? Does it print spaces between records on new-lines?

On Wed, Mar 19, 2008 at 3:17 PM, varun sood <[EMAIL PROTECTED]> wrote:

> Hi All,
>  Can someone please guide me on how to use IndexReader's
> getFieldNames() method properly?
> I want to get all the filed names in the index. Currently I am getitng
> it via Document object but that not wt i want.
> I am implementing the code below and what I get is a very long string
> of characters.. perhaps equivalent to the number of records in the
> index.
>
> Collection c = ir.getFieldNames(IndexReader.FieldOption.ALL);
> int i = 0;
> while (c.iterator().hasNext()) {
>    Field s = (Field) c.iterator().next();
>    out.print(s.name());
>    i++;
> }
>
> Thanks,
> Varun.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards,

Shai Erera

Reply via email to