Search in sources :

Example 1 with DuplicateFilter

use of org.apache.lucene.sandbox.queries.DuplicateFilter in project querydsl by querydsl.

the class LuceneQueryTest method list_with_filter.

@Test
public void list_with_filter() {
    Filter filter = new DuplicateFilter("year");
    assertEquals(4, query.fetch().size());
    assertEquals(3, query.filter(filter).fetch().size());
}
Also used : DuplicateFilter(org.apache.lucene.sandbox.queries.DuplicateFilter) DuplicateFilter(org.apache.lucene.sandbox.queries.DuplicateFilter) Filter(org.apache.lucene.search.Filter) Test(org.junit.Test)

Example 2 with DuplicateFilter

use of org.apache.lucene.sandbox.queries.DuplicateFilter in project querydsl by querydsl.

the class LuceneQueryTest method list_with_filter.

@Test
public void list_with_filter() {
    Filter filter = new DuplicateFilter("year");
    assertEquals(4, query.fetch().size());
    assertEquals(3, query.filter(filter).fetch().size());
}
Also used : DuplicateFilter(org.apache.lucene.sandbox.queries.DuplicateFilter) DuplicateFilter(org.apache.lucene.sandbox.queries.DuplicateFilter) Filter(org.apache.lucene.search.Filter) Test(org.junit.Test)

Aggregations

DuplicateFilter (org.apache.lucene.sandbox.queries.DuplicateFilter)2 Filter (org.apache.lucene.search.Filter)2 Test (org.junit.Test)2