i want to search files created between two dates and i am getting an error,plz help me anyone
XML Code:
		Term begin = new Term("date","20130101");
		Term end = new Term("date","20130225");
		Query query = new RangeQuery(begin, end, true);
		/* First parameter is the query to be executed and 
		   second parameter indicates the no of search results to fetch */
		   TopDocs topDocs = indexSearcher.search(query,3);	
		   System.out.println("Total hits "+topDocs.totalHits);

		   // Get an array of references to matched documents
		   ScoreDoc[] scoreDosArray = topDocs.scoreDocs;	
		   for(ScoreDoc scoredoc: scoreDosArray){
		      //Retrieve the matched document and show relevant details
		      Document doc = indexSearcher.doc(scoredoc.doc);
		      System.out.println("\nSender: "+doc.getField("sender").stringValue());
		      System.out.println("Subject: "+doc.getField("subject").stringValue());
		      System.out.println("Email file location: "
Error:for the above code i am getting below error

XML Code:
at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:616)
	at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:663)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
	at verinon.tech.RangeSearch.main(RangeSearch.java:37)