FileDocCategorySizeDatePackage
Test02Boolean.javaAPI DocApache Lucene 2.2.04409Sat Jun 16 22:20:44 BST 2007org.apache.lucene.queryParser.surround.query

Test02Boolean

public class Test02Boolean extends TestCase
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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);