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
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.TestFramework.dll
Syntax
public abstract class SearchEquivalenceTestBase : LuceneTestCase
Fields
| Improve this Doc View Sourcem_analyzer
Declaration
protected static Analyzer m_analyzer
Field Value
Type | Description |
---|---|
Analyzer |
m_directory
Declaration
protected static Directory m_directory
Field Value
Type | Description |
---|---|
Directory |
m_reader
Declaration
protected static IndexReader m_reader
Field Value
Type | Description |
---|---|
IndexReader |
m_s1
Declaration
protected static IndexSearcher m_s1
Field Value
Type | Description |
---|---|
IndexSearcher |
m_s2
Declaration
protected static IndexSearcher m_s2
Field Value
Type | Description |
---|---|
IndexSearcher |
m_stopword
Declaration
protected static string m_stopword
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAfterClass()
Declaration
[OneTimeTearDown]
public override void AfterClass()
Overrides
| Improve this Doc View SourceAssertSameSet(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
.
Both queries will be filtered by filter
.
Declaration
protected virtual void AssertSubsetOf(Query q1, Query q2, Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Query | q1 | |
Query | q2 | |
Filter | filter |
BeforeClass()
Declaration
[OneTimeSetUp]
public override void BeforeClass()
Overrides
| Improve this Doc View SourceRandomFilter()
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 |