Search in sources :

Example 1 with SuffixItem

use of com.yahoo.prelude.query.SuffixItem in project vespa by vespa-engine.

the class ParseTestCase method testSuffixAndWordTerms.

@Test
public void testSuffixAndWordTerms() {
    Item root = tester.assertParsed("OR foo *suffix bar", "foo *suffix bar", Query.Type.ANY);
    assertTrue(((OrItem) root).getItem(1) instanceof SuffixItem);
}
Also used : SuffixItem(com.yahoo.prelude.query.SuffixItem) CompositeItem(com.yahoo.prelude.query.CompositeItem) PhraseSegmentItem(com.yahoo.prelude.query.PhraseSegmentItem) PrefixItem(com.yahoo.prelude.query.PrefixItem) Item(com.yahoo.prelude.query.Item) SuffixItem(com.yahoo.prelude.query.SuffixItem) IntItem(com.yahoo.prelude.query.IntItem) OrItem(com.yahoo.prelude.query.OrItem) PhraseItem(com.yahoo.prelude.query.PhraseItem) SubstringItem(com.yahoo.prelude.query.SubstringItem) AndItem(com.yahoo.prelude.query.AndItem) RankItem(com.yahoo.prelude.query.RankItem) WordItem(com.yahoo.prelude.query.WordItem) NotItem(com.yahoo.prelude.query.NotItem) OrItem(com.yahoo.prelude.query.OrItem) Test(org.junit.Test)

Example 2 with SuffixItem

use of com.yahoo.prelude.query.SuffixItem in project vespa by vespa-engine.

the class ParseTestCase method testSuffixExtraSpace.

@Test
public void testSuffixExtraSpace() {
    Item root = tester.assertParsed("*suffix", "* suffix", Query.Type.ANY);
    assertTrue(root instanceof SuffixItem);
}
Also used : SuffixItem(com.yahoo.prelude.query.SuffixItem) CompositeItem(com.yahoo.prelude.query.CompositeItem) PhraseSegmentItem(com.yahoo.prelude.query.PhraseSegmentItem) PrefixItem(com.yahoo.prelude.query.PrefixItem) Item(com.yahoo.prelude.query.Item) SuffixItem(com.yahoo.prelude.query.SuffixItem) IntItem(com.yahoo.prelude.query.IntItem) OrItem(com.yahoo.prelude.query.OrItem) PhraseItem(com.yahoo.prelude.query.PhraseItem) SubstringItem(com.yahoo.prelude.query.SubstringItem) AndItem(com.yahoo.prelude.query.AndItem) RankItem(com.yahoo.prelude.query.RankItem) WordItem(com.yahoo.prelude.query.WordItem) NotItem(com.yahoo.prelude.query.NotItem) Test(org.junit.Test)

Example 3 with SuffixItem

use of com.yahoo.prelude.query.SuffixItem in project vespa by vespa-engine.

the class ParseTestCase method testSuffixWithWeight.

@Test
public void testSuffixWithWeight() {
    Item root = tester.assertParsed("*suffix!200", "*suffix!200", Query.Type.ANY);
    assertTrue(root instanceof SuffixItem);
}
Also used : SuffixItem(com.yahoo.prelude.query.SuffixItem) CompositeItem(com.yahoo.prelude.query.CompositeItem) PhraseSegmentItem(com.yahoo.prelude.query.PhraseSegmentItem) PrefixItem(com.yahoo.prelude.query.PrefixItem) Item(com.yahoo.prelude.query.Item) SuffixItem(com.yahoo.prelude.query.SuffixItem) IntItem(com.yahoo.prelude.query.IntItem) OrItem(com.yahoo.prelude.query.OrItem) PhraseItem(com.yahoo.prelude.query.PhraseItem) SubstringItem(com.yahoo.prelude.query.SubstringItem) AndItem(com.yahoo.prelude.query.AndItem) RankItem(com.yahoo.prelude.query.RankItem) WordItem(com.yahoo.prelude.query.WordItem) NotItem(com.yahoo.prelude.query.NotItem) Test(org.junit.Test)

Example 4 with SuffixItem

use of com.yahoo.prelude.query.SuffixItem in project vespa by vespa-engine.

the class ParseTestCase method testIndexedSuffix.

@Test
public void testIndexedSuffix() {
    Item root = tester.assertParsed("foo.bar:*suffix", "foo.bar:*suffix", Query.Type.ANY);
    assertTrue(root instanceof SuffixItem);
}
Also used : SuffixItem(com.yahoo.prelude.query.SuffixItem) CompositeItem(com.yahoo.prelude.query.CompositeItem) PhraseSegmentItem(com.yahoo.prelude.query.PhraseSegmentItem) PrefixItem(com.yahoo.prelude.query.PrefixItem) Item(com.yahoo.prelude.query.Item) SuffixItem(com.yahoo.prelude.query.SuffixItem) IntItem(com.yahoo.prelude.query.IntItem) OrItem(com.yahoo.prelude.query.OrItem) PhraseItem(com.yahoo.prelude.query.PhraseItem) SubstringItem(com.yahoo.prelude.query.SubstringItem) AndItem(com.yahoo.prelude.query.AndItem) RankItem(com.yahoo.prelude.query.RankItem) WordItem(com.yahoo.prelude.query.WordItem) NotItem(com.yahoo.prelude.query.NotItem) Test(org.junit.Test)

Example 5 with SuffixItem

use of com.yahoo.prelude.query.SuffixItem in project vespa by vespa-engine.

the class ParseTestCase method testSuffixExtraStar.

@Test
public void testSuffixExtraStar() {
    Item root = tester.assertParsed("*suffix", "**suffix", Query.Type.ANY);
    assertTrue(root instanceof SuffixItem);
}
Also used : SuffixItem(com.yahoo.prelude.query.SuffixItem) CompositeItem(com.yahoo.prelude.query.CompositeItem) PhraseSegmentItem(com.yahoo.prelude.query.PhraseSegmentItem) PrefixItem(com.yahoo.prelude.query.PrefixItem) Item(com.yahoo.prelude.query.Item) SuffixItem(com.yahoo.prelude.query.SuffixItem) IntItem(com.yahoo.prelude.query.IntItem) OrItem(com.yahoo.prelude.query.OrItem) PhraseItem(com.yahoo.prelude.query.PhraseItem) SubstringItem(com.yahoo.prelude.query.SubstringItem) AndItem(com.yahoo.prelude.query.AndItem) RankItem(com.yahoo.prelude.query.RankItem) WordItem(com.yahoo.prelude.query.WordItem) NotItem(com.yahoo.prelude.query.NotItem) Test(org.junit.Test)

Aggregations

AndItem (com.yahoo.prelude.query.AndItem)9 CompositeItem (com.yahoo.prelude.query.CompositeItem)9 IntItem (com.yahoo.prelude.query.IntItem)9 Item (com.yahoo.prelude.query.Item)9 NotItem (com.yahoo.prelude.query.NotItem)9 OrItem (com.yahoo.prelude.query.OrItem)9 PhraseItem (com.yahoo.prelude.query.PhraseItem)9 PhraseSegmentItem (com.yahoo.prelude.query.PhraseSegmentItem)9 PrefixItem (com.yahoo.prelude.query.PrefixItem)9 RankItem (com.yahoo.prelude.query.RankItem)9 SubstringItem (com.yahoo.prelude.query.SubstringItem)9 SuffixItem (com.yahoo.prelude.query.SuffixItem)9 WordItem (com.yahoo.prelude.query.WordItem)9 Test (org.junit.Test)8 AndSegmentItem (com.yahoo.prelude.query.AndSegmentItem)1 DotProductItem (com.yahoo.prelude.query.DotProductItem)1 EquivItem (com.yahoo.prelude.query.EquivItem)1 ExactStringItem (com.yahoo.prelude.query.ExactStringItem)1 NearItem (com.yahoo.prelude.query.NearItem)1 NullItem (com.yahoo.prelude.query.NullItem)1