Lucene.Net.QueryParsers.TestQueryParser.AddDateDoc C# (CSharp) Method

AddDateDoc() private static method

private static AddDateDoc ( System content, int year, int month, int day, int hour, int minute, int second, Lucene.Net.Index.IndexWriter iw ) : void
content System
year int
month int
day int
hour int
minute int
second int
iw Lucene.Net.Index.IndexWriter
return void
		private static void  AddDateDoc(System.String content, int year, int month, int day, int hour, int minute, int second, IndexWriter iw)
		{
			Document d = new Document();
			d.Add(new Field("f", content, Field.Store.YES, Field.Index.ANALYZED));
			System.Globalization.Calendar cal = new System.Globalization.GregorianCalendar();
			System.DateTime tempAux = new System.DateTime(year, month, day, hour, minute, second, cal);
			d.Add(new Field("date", DateField.DateToString(tempAux), Field.Store.YES, Field.Index.NOT_ANALYZED));
			iw.AddDocument(d);
		}