Class SearchEquivalenceTestBase
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.TestFramework.dll
Syntax
public abstract class SearchEquivalenceTestBase : LuceneTestCase
  Fields
m_analyzer
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static Analyzer m_analyzer
  Field Value
| Type | Description | 
|---|---|
| Analyzer | 
m_directory
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static Directory m_directory
  Field Value
| Type | Description | 
|---|---|
| Directory | 
m_reader
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static IndexReader m_reader
  Field Value
| Type | Description | 
|---|---|
| IndexReader | 
m_s1
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static IndexSearcher m_s1
  Field Value
| Type | Description | 
|---|---|
| IndexSearcher | 
m_s2
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static IndexSearcher m_s2
  Field Value
| Type | Description | 
|---|---|
| IndexSearcher | 
m_stopword
Simple base class for checking search equivalence. Extend it, and write tests that create RandomTerm()s (all terms are single characters a-z), and use AssertSameSet(Query, Query) and AssertSubsetOf(Query, Query).
Declaration
protected static string m_stopword
  Field Value
| Type | Description | 
|---|---|
| string | 
Methods
AfterClass()
Tears down random defaults and cleans up temporary files.
If you override this method, be sure to callbase.AfterClass() AFTER
tearing down your test fixture.
Declaration
[OneTimeTearDown]
public override void AfterClass()
  Overrides
AssertSameSet(Query, Query)
Asserts that the documents returned by q1
are the same as of those returned by q2.
Declaration
public virtual void AssertSameSet(Query q1, Query q2)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Query | q1 | |
| Query | q2 | 
AssertSubsetOf(Query, Query)
Asserts that the documents returned by q1
are a subset of those returned by q2.
Declaration
public virtual void AssertSubsetOf(Query q1, Query q2)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Query | q1 | |
| Query | q2 | 
AssertSubsetOf(Query, Query, Filter)
Asserts that the documents returned by q1
are a subset of those returned by q2.
filter.
Declaration
protected virtual void AssertSubsetOf(Query q1, Query q2, Filter filter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Query | q1 | |
| Query | q2 | |
| Filter | filter | 
BeforeClass()
Sets up dependency injection of codec factories for running the test class, and also picks random defaults for culture, time zone, similarity, and default codec.
If you override this method, be sure to callbase.BeforeClass() BEFORE setting
up your test fixture.
Declaration
[OneTimeSetUp]
public override void BeforeClass()
  Overrides
RandomFilter()
Returns a random filter over the document set.
Declaration
protected virtual Filter RandomFilter()
  Returns
| Type | Description | 
|---|---|
| Filter | 
RandomTerm()
Returns a term suitable for searching. Terms are single characters in lowercase (a-z).
Declaration
protected virtual Term RandomTerm()
  Returns
| Type | Description | 
|---|---|
| Term |