Hi James, >From one side, it is easy - you simply enumerate all the found objects, and for each object retrieve the field Supervisor, sorting and removing duplicates on the fly. >From the other side, this way you'll get linear performance, and even worse - retrieving fields is not a very fast operation. But there is no other way to do it in Lucene, AFAIK. Lucene was not designed for such usage.
Best Regards, Andrew -----Original Message----- From: James Cook [mailto:[EMAIL PROTECTED] Sent: Friday, March 10, 2006 8:39 PM To: java-user@lucene.apache.org Subject: Alternate Use of Lucene Is there a technique, using Lucene, to retrieve the remaining index values from the results of a query? Here is a better explanation of the question. I have various fields that have been indexed on a particular collection of Java POJO's. For example, an Employee object may have the following fields: id, salary, hire date, termination date, department, supervisor, etc.. I want to issue a query such as "department: 15". This restricts my list of Employee objects to those with a department value of 15. What may be a little different at this stage is I don't care about the resulting Employee list. What I really want is access to the Lucene index values for the 'supervisor' field. Basically, I want a list of those supervisors for the resulting filtered list of Employees. Does lucene provide an API to access these values? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]