You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by James Cook <dj...@gmail.com> on 2006/03/10 19:39:05 UTC

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Alternate Use of Lucene

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Representing an object graph in Lucene is not straightforwardly  
possible.  I recommend you consider flattening your object graph in  
order to index it using Lucene.  This will denormalize it, but that  
is not a problem.

	Erik


On Mar 10, 2006, at 1:39 PM, James Cook wrote:

> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org