Way to set lucene filters on queries

Bug #723186 reported by Lassi Immonen on 2011-02-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

Lucene has DuplicateFilter which could be used to filter distinct fields on documents. It would be nice to be able to utilize this filter in queries. For example query.where(name.distinct(LAST_OCCURRENCE).eq("Timo")) or some other neat way.

Added support for distinct(path) and general filtering :

     * Add a DuplicateFilter for the field of the given property path
     * @param property
     * @return
    public Q distinct(Path<?> property){
        return filter(new DuplicateFilter(serializer.toField(property)));

     * Apply the given Lucene filter to the search results
     * @param filter
     * @return
    public Q filter(Filter filter){
        this.filter = filter;
        return (Q)this;

Changed in querydsl:
status: New → Fix Committed

Released in 2.2.0-beta1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers