public virtual void TestExclusiveLowerNull()
{
Analyzer analyzer = new SingleCharAnalyzer();
//http://issues.apache.org/jira/browse/LUCENE-38
Query query = new TermRangeQuery("content", null, "C", false, false);
InitializeIndex(new System.String[]{"A", "B", "", "C", "D"}, analyzer);
IndexSearcher searcher = new IndexSearcher(dir, true);
int numHits = searcher.Search(query, null, 1000).TotalHits;
// When Lucene-38 is fixed, use the assert on the next line:
Assert.AreEqual(3, numHits, "A,B,<empty string>,C,D => A, B & <empty string> are in range");
// until Lucene-38 is fixed, use this assert:
//Assert.AreEqual(2, hits.length(),"A,B,<empty string>,C,D => A, B & <empty string> are in range");
searcher.Close();
InitializeIndex(new System.String[]{"A", "B", "", "D"}, analyzer);
searcher = new IndexSearcher(dir, true);
numHits = searcher.Search(query, null, 1000).TotalHits;
// When Lucene-38 is fixed, use the assert on the next line:
Assert.AreEqual(3, numHits, "A,B,<empty string>,D => A, B & <empty string> are in range");
// until Lucene-38 is fixed, use this assert:
//Assert.AreEqual(2, hits.length(), "A,B,<empty string>,D => A, B & <empty string> are in range");
searcher.Close();
AddDoc("C");
searcher = new IndexSearcher(dir, true);
numHits = searcher.Search(query, null, 1000).TotalHits;
// When Lucene-38 is fixed, use the assert on the next line:
Assert.AreEqual(3, numHits, "C added, still A, B & <empty string> are in range");
// until Lucene-38 is fixed, use this assert
//Assert.AreEqual(2, hits.length(), "C added, still A, B & <empty string> are in range");
searcher.Close();
}