lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Distinct terms values? (like in Luke)
Date Sun, 10 May 2009 17:46:30 GMT
> Don't mean to hijack this thread, but I have a related question:
> 
> Is there also a way to filter the terms based on another field?
> 
> For example, the documents might also contain the field "published
> date", so I want to get a distinct list of values for the term
> "religion" in documents published within a range of dates.

This is not covered by the TermEnum and cannot be retrieved easily. If you
really need such functionality, you can e.g. use payloads. So index the
religion as a term and attach the dates as a binary payload. Then you can
enumerate over all religions like mentioned before, but filter the terms
using the TermPositions access methods. It may also be possible the other
way round (index dates and attach religion as payload).

Uwe


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


Mime
View raw message