Project

General

Profile

Revision 088873e9

ID088873e9132d3e6ea76b6e73917ca447b78d3289
Parent d93004c1
Child 69222e4e

Added by Andreas Kohlbecker over 4 years ago

ref #6354 additinonal test for non phrase queries

View differences:

cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/search/QueryFactoryTest.java
12 12

  
13 13
import org.apache.lucene.search.BooleanQuery;
14 14
import org.apache.lucene.search.PhraseQuery;
15
import org.apache.lucene.search.PrefixQuery;
15 16
import org.apache.lucene.search.TermQuery;
16 17
import org.junit.Assert;
17 18
import org.junit.Test;
......
36 37
        QueryFactory qf = new QueryFactory(luceneIndexToolProvider, Taxon.class);
37 38
        Assert.assertEquals(TermQuery.class, qf.newTermQuery("titleCache", "Lactuca", true).getClass());
38 39
        Assert.assertEquals(BooleanQuery.class, qf.newTermQuery("titleCache", "Lactuca perennis", true).getClass());
40
        Assert.assertEquals(PrefixQuery.class, qf.newTermQuery("titleCache", "Lactu*", true).getClass());
39 41
        Assert.assertEquals(PhraseQuery.class, qf.newTermQuery("titleCache", "\"Lactuca perennis\"", true).getClass());
40 42
    }
41 43

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)