org.apache.lucene.queryParser
Class QueryParserTestBase

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.lucene.util.LuceneTestCase
          extended by org.apache.lucene.queryParser.QueryParserTestBase

public abstract class QueryParserTestBase
extends LuceneTestCase

Base Test class for QueryParser subclasses


Nested Class Summary
static class QueryParserTestBase.QPTestAnalyzer
           
static class QueryParserTestBase.QPTestFilter
           
static class QueryParserTestBase.QPTestParser
           
 
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
 
Field Summary
static org.apache.lucene.analysis.Analyzer qpAnalyzer
           
 
Fields inherited from class org.apache.lucene.util.LuceneTestCase
intercept, random, RANDOM_MULTIPLIER, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
 
Constructor Summary
QueryParserTestBase()
           
 
Method Summary
 void assertDateRangeQueryEquals(org.apache.lucene.queryParser.QueryParser qp, String field, String startDate, String endDate, Date endDateInclusive, org.apache.lucene.document.DateTools.Resolution resolution)
           
 void assertEscapedQueryEquals(String query, org.apache.lucene.analysis.Analyzer a, String result)
           
 void assertParseException(String queryString)
           
 void assertQueryEquals(org.apache.lucene.queryParser.QueryParser qp, String field, String query, String result)
           
 void assertQueryEquals(String query, org.apache.lucene.analysis.Analyzer a, String result)
           
 void assertQueryEqualsDOA(String query, org.apache.lucene.analysis.Analyzer a, String result)
           
 void assertWildcardQueryEquals(String query, boolean lowercase, String result)
           
 void assertWildcardQueryEquals(String query, boolean lowercase, String result, boolean allowLeadingWildcard)
           
 void assertWildcardQueryEquals(String query, String result)
           
abstract  org.apache.lucene.queryParser.QueryParser getParser(org.apache.lucene.analysis.Analyzer a)
           
 org.apache.lucene.search.Query getQuery(String query, org.apache.lucene.analysis.Analyzer a)
           
 org.apache.lucene.search.Query getQueryDOA(String query, org.apache.lucene.analysis.Analyzer a)
           
 void setUp()
           
 void tearDown()
           
 void testAutoGeneratePhraseQueriesOn()
           
 void testBooleanQuery()
           
 void testBoost()
           
 void testCJK()
           
 void testCJKBoostedPhrase()
           
 void testCJKBoostedTerm()
           
 void testCJKPhrase()
           
 void testCJKSloppyPhrase()
           
 void testCJKTerm()
           
 void testCustomQueryParserFuzzy()
           
 void testCustomQueryParserWildcard()
           
 void testDateRange()
           
 void testEscaped()
           
 void testException()
           
 void testFarsiRangeCollating()
           
 void testLeadingWildcardType()
           
 void testLegacyDateRange()
          for testing legacy DateField support
 void testLocalDateFormat()
           
 void testMatchAllDocs()
           
 void testNumber()
           
 void testPositionIncrement()
           
 void testPositionIncrements()
           
 void testPrecedence()
          This test differs from TestPrecedenceQueryParser
 void testProtectedCtors()
           
 void testPunct()
           
 void testQPA()
           
 void testQueryStringEscaping()
           
 void testRange()
           
 void testSimple()
           
 void testSimpleDAO()
           
 void testSlop()
           
 void testStarParsing()
           
 void testStopwords()
           
 void testTabNewlineCarriageReturn()
           
 void testWildcard()
           
 
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestLabel, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, registerTempFile, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUseCompoundFile, usually, usually
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qpAnalyzer

public static org.apache.lucene.analysis.Analyzer qpAnalyzer
Constructor Detail

QueryParserTestBase

public QueryParserTestBase()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class LuceneTestCase
Throws:
Exception

getParser

public abstract org.apache.lucene.queryParser.QueryParser getParser(org.apache.lucene.analysis.Analyzer a)
                                                             throws Exception
Throws:
Exception

getQuery

public org.apache.lucene.search.Query getQuery(String query,
                                               org.apache.lucene.analysis.Analyzer a)
                                        throws Exception
Throws:
Exception

assertQueryEquals

public void assertQueryEquals(String query,
                              org.apache.lucene.analysis.Analyzer a,
                              String result)
                       throws Exception
Throws:
Exception

assertQueryEquals

public void assertQueryEquals(org.apache.lucene.queryParser.QueryParser qp,
                              String field,
                              String query,
                              String result)
                       throws Exception
Throws:
Exception

assertEscapedQueryEquals

public void assertEscapedQueryEquals(String query,
                                     org.apache.lucene.analysis.Analyzer a,
                                     String result)
                              throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      boolean lowercase,
                                      String result,
                                      boolean allowLeadingWildcard)
                               throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      boolean lowercase,
                                      String result)
                               throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      String result)
                               throws Exception
Throws:
Exception

getQueryDOA

public org.apache.lucene.search.Query getQueryDOA(String query,
                                                  org.apache.lucene.analysis.Analyzer a)
                                           throws Exception
Throws:
Exception

assertQueryEqualsDOA

public void assertQueryEqualsDOA(String query,
                                 org.apache.lucene.analysis.Analyzer a,
                                 String result)
                          throws Exception
Throws:
Exception

testCJK

public void testCJK()
             throws Exception
Throws:
Exception

testCJKTerm

public void testCJKTerm()
                 throws Exception
Throws:
Exception

testCJKBoostedTerm

public void testCJKBoostedTerm()
                        throws Exception
Throws:
Exception

testCJKPhrase

public void testCJKPhrase()
                   throws Exception
Throws:
Exception

testCJKBoostedPhrase

public void testCJKBoostedPhrase()
                          throws Exception
Throws:
Exception

testCJKSloppyPhrase

public void testCJKSloppyPhrase()
                         throws Exception
Throws:
Exception

testAutoGeneratePhraseQueriesOn

public void testAutoGeneratePhraseQueriesOn()
                                     throws Exception
Throws:
Exception

testSimple

public void testSimple()
                throws Exception
Throws:
Exception

testPunct

public void testPunct()
               throws Exception
Throws:
Exception

testSlop

public void testSlop()
              throws Exception
Throws:
Exception

testNumber

public void testNumber()
                throws Exception
Throws:
Exception

testWildcard

public void testWildcard()
                  throws Exception
Throws:
Exception

testLeadingWildcardType

public void testLeadingWildcardType()
                             throws Exception
Throws:
Exception

testQPA

public void testQPA()
             throws Exception
Throws:
Exception

testRange

public void testRange()
               throws Exception
Throws:
Exception

testFarsiRangeCollating

public void testFarsiRangeCollating()
                             throws Exception
Throws:
Exception

testLegacyDateRange

public void testLegacyDateRange()
                         throws Exception
for testing legacy DateField support

Throws:
Exception

testDateRange

public void testDateRange()
                   throws Exception
Throws:
Exception

assertDateRangeQueryEquals

public void assertDateRangeQueryEquals(org.apache.lucene.queryParser.QueryParser qp,
                                       String field,
                                       String startDate,
                                       String endDate,
                                       Date endDateInclusive,
                                       org.apache.lucene.document.DateTools.Resolution resolution)
                                throws Exception
Throws:
Exception

testEscaped

public void testEscaped()
                 throws Exception
Throws:
Exception

testQueryStringEscaping

public void testQueryStringEscaping()
                             throws Exception
Throws:
Exception

testTabNewlineCarriageReturn

public void testTabNewlineCarriageReturn()
                                  throws Exception
Throws:
Exception

testSimpleDAO

public void testSimpleDAO()
                   throws Exception
Throws:
Exception

testBoost

public void testBoost()
               throws Exception
Throws:
Exception

assertParseException

public void assertParseException(String queryString)
                          throws Exception
Throws:
Exception

testException

public void testException()
                   throws Exception
Throws:
Exception

testCustomQueryParserWildcard

public void testCustomQueryParserWildcard()

testCustomQueryParserFuzzy

public void testCustomQueryParserFuzzy()
                                throws Exception
Throws:
Exception

testBooleanQuery

public void testBooleanQuery()
                      throws Exception
Throws:
Exception

testPrecedence

public void testPrecedence()
                    throws Exception
This test differs from TestPrecedenceQueryParser

Throws:
Exception

testLocalDateFormat

public void testLocalDateFormat()
                         throws IOException,
                                org.apache.lucene.queryParser.ParseException
Throws:
IOException
org.apache.lucene.queryParser.ParseException

testStarParsing

public void testStarParsing()
                     throws Exception
Throws:
Exception

testStopwords

public void testStopwords()
                   throws Exception
Throws:
Exception

testPositionIncrement

public void testPositionIncrement()
                           throws Exception
Throws:
Exception

testMatchAllDocs

public void testMatchAllDocs()
                      throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class LuceneTestCase
Throws:
Exception

testPositionIncrements

public void testPositionIncrements()
                            throws Exception
Throws:
Exception

testProtectedCtors

public void testProtectedCtors()
                        throws Exception
Throws:
Exception


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.