Way to set lucene filters on queries
Bug #723186 reported by
Lassi Immonen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
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(
To post a comment you must log in.
Added support for distinct(path) and general filtering :
/** (serializer. toField( property) ));
* Add a DuplicateFilter for the field of the given property path
*
* @param property
* @return
*/
public Q distinct(Path<?> property){
return filter(new DuplicateFilter
}
/** rnings( "unchecked" )
* Apply the given Lucene filter to the search results
*
* @param filter
* @return
*/
@SuppressWa
public Q filter(Filter filter){
this.filter = filter;
return (Q)this;
}