FileDocCategorySizeDatePackage
Test02Boolean.javaAPI DocApache Lucene 1.93605Mon Feb 20 09:17:42 GMT 2006org.apache.lucene.queryParser.surround.query

Test02Boolean

public class Test02Boolean extends TestCase

Fields Summary
final String
fieldName
boolean
verbose
int
maxBasicQueries
String[]
docs1
SingleFieldTestDb
db1
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    TestRunner.run(new TestSuite(Test02Boolean.class));
  
public voidnormalTest1(java.lang.String query, int[] expdnrs)


          
    BooleanQueryTst bqt = new BooleanQueryTst( query, expdnrs, db1, fieldName, this,
                                                new BasicQueryFactory(maxBasicQueries));
    bqt.setVerbose(verbose);
    bqt.doTest();
  
public voidtest02Terms01()

    int[] expdnrs = {0}; normalTest1( "word1", expdnrs);
  
public voidtest02Terms02()

    int[] expdnrs = {0, 1, 3}; normalTest1( "word*", expdnrs);
  
public voidtest02Terms03()

    int[] expdnrs = {2}; normalTest1( "ord2", expdnrs);
  
public voidtest02Terms04()

    int[] expdnrs = {}; normalTest1( "kxork*", expdnrs);
  
public voidtest02Terms05()

    int[] expdnrs = {0, 1, 3}; normalTest1( "wor*", expdnrs);
  
public voidtest02Terms06()

    int[] expdnrs = {}; normalTest1( "ab", expdnrs);
  
public voidtest02Terms10()

    int[] expdnrs = {}; normalTest1( "abc?", expdnrs);
  
public voidtest02Terms13()

    int[] expdnrs = {0,1,3}; normalTest1( "word?", expdnrs);
  
public voidtest02Terms14()

    int[] expdnrs = {0,1,3}; normalTest1( "w?rd?", expdnrs);
  
public voidtest02Terms20()

    int[] expdnrs = {0,1,3}; normalTest1( "w*rd?", expdnrs);
  
public voidtest02Terms21()

    int[] expdnrs = {3}; normalTest1( "w*rd??", expdnrs);
  
public voidtest02Terms22()

    int[] expdnrs = {3}; normalTest1( "w*?da?", expdnrs);
  
public voidtest02Terms23()

    int[] expdnrs = {}; normalTest1( "w?da?", expdnrs);
  
public voidtest03And01()

    int[] expdnrs = {0}; normalTest1( "word1 AND word2", expdnrs);
  
public voidtest03And02()

    int[] expdnrs = {3}; normalTest1( "word* and ord*", expdnrs);
  
public voidtest03And03()

    int[] expdnrs = {0}; normalTest1( "and(word1,word2)", expdnrs);
  
public voidtest04Or01()

    int[] expdnrs = {0, 3}; normalTest1( "word1 or word2", expdnrs);
  
public voidtest04Or02()

    int[] expdnrs = {0, 1, 2, 3}; normalTest1( "word* OR ord*", expdnrs);
  
public voidtest04Or03()

    int[] expdnrs = {0, 3}; normalTest1( "OR (word1, word2)", expdnrs);
  
public voidtest05Not01()

    int[] expdnrs = {3}; normalTest1( "word2 NOT word1", expdnrs);
  
public voidtest05Not02()

    int[] expdnrs = {0}; normalTest1( "word2* not ord*", expdnrs);
  
public voidtest06AndOr01()

    int[] expdnrs = {0}; normalTest1( "(word1 or ab)and or(word2,xyz, defg)", expdnrs);
  
public voidtest07AndOrNot02()

    int[] expdnrs = {0}; normalTest1( "or( word2* not ord*, and(xyz,def))", expdnrs);