Lingjuan Peng | 20 Nov 14:53
Picon

help me please! Date range search support problem

dear all:
        hi! i am new user of Xapian. now i want to suuport search with date
range. something like  i want to search the pages of time span
"20090901...20090928" when i input 20090901 and 20090928 in the main search
web. but now i am so confused of the code.could you please give me some
help? and thank you very much!
and my code is as follows:
            qp.set_default_op(Xapian::
Query::OP_AND);
            Xapian::Query query =
qp.parse_query(StrQUERY_STRING);//StrQUERY_STRING is the key query terms.
            Xapian::Query range =
Xapian::Query(Xapian::Query::OP_VALUE_RANGE, 0, StrTimeBegin,
StrTimeEnd);//StrTimeBegin and StrTimeEnd are the time span i input in
            enquire.set_query(query);
....

and when i run the program,the output is " parsed query is :
Xapian::Query((usa:(pos=1) FILTER VALUE_RANGE 0  ))"
that means the begin time and end time didn't transfer to the program.please
tell me how to do ? thank you very much!
best wishes!

caddie

Gmane