public void SetUp()
{
directory = new RAMDirectory();
IndexWriter writer = new IndexWriter(directory, new StandardAnalyzer(Util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
//Add series of docs with filterable fields : url, text and dates flags
AddDoc(writer, "http://lucene.apache.org", "lucene 1.4.3 available", "20040101");
AddDoc(writer, "http://lucene.apache.org", "New release pending", "20040102");
AddDoc(writer, "http://lucene.apache.org", "Lucene 1.9 out now", "20050101");
AddDoc(writer, "http://www.bar.com", "Local man bites dog", "20040101");
AddDoc(writer, "http://www.bar.com", "Dog bites local man", "20040102");
AddDoc(writer, "http://www.bar.com", "Dog uses Lucene", "20050101");
AddDoc(writer, "http://lucene.apache.org", "Lucene 2.0 out", "20050101");
AddDoc(writer, "http://lucene.apache.org", "Oops. Lucene 2.1 out", "20050102");
writer.Close();
reader = IndexReader.Open(directory,true);
searcher = new IndexSearcher(reader);
}