dcsimg
How to implement a dateFilter ?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Akhil_Batta
Posted On:   Thursday, July 11, 2002 01:17 PM

Dear All I want to search result between to specific dates i am trying to use DateFilter its not working .where what i am doing During Indexing i am getting date from DB in YYYY-MM-DD format. Date rel_date=rs.getDate(6); and using DateField to convert the date into String and assign it to part of search index. doc.add(Field.Keyword(DATE,DateField.dateToString(rel_date))); During searh i am using following code Date ldate=new Date(2001,11,11); Date udate=new Date(2002,12,19); DateFilter df=new DateFilter (IncreIndexTable.DATE,ldate,udate); hits = searcher.search(query,df); and its giving me nullpointer Exception . any    More>>

Dear All

I want to search result between to specific dates i am trying to use DateFilter its not working .where what i am doing

During Indexing i am getting date from DB in YYYY-MM-DD format.

Date rel_date=rs.getDate(6);

and using DateField to convert the date into String
and assign it to part of search index.

doc.add(Field.Keyword(DATE,DateField.dateToString(rel_date)));

During searh i am using following code
Date ldate=new Date(2001,11,11);
Date udate=new Date(2002,12,19);
DateFilter df=new DateFilter (IncreIndexTable.DATE,ldate,udate);
hits = searcher.search(query,df);


and its giving me nullpointer Exception .

any comments on it ?
if you have any other idea with code please describe it.

Thanx in advance

Akhil

   <<Less
About | Sitemap | Contact