On Mon, 2005-01-17 at 13:36 +0100, Tim Lebedkov (UPK) wrote:
> is it possible to get all different values for a
> <Field> from a <Hits> object and how to do this?

Not unless you iterate through all the documents in the Hits object,
e.g.

Set fields = new HashSet();
for (int i = 0; i < hits.length(); i++) {
    Document doc = hits.doc(i);
    fields.add(doc.get("fieldName"));
}

but you probably don't want to do this on a per search basis because
retrieving the document is an expensive operation.



-- 
Miles Barr <[EMAIL PROTECTED]>
Runtime Collective Ltd.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to