Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEFINE_TESTCASE(ranker1, !backend) {
- Xapian::Database db = get_database("apitest_rset");
- Xapian::Enquire enquire(db);
- enquire.set_query(Xapian::Query("and"));
- string query ="20001 'and'";
- string qrel = "20001 Q0 1 1\n20001 Q0 2 2\n20001 Q0 3 3";
- std::ofstream myfile;
- myfile.open("query.txt");
- myfile << query;
- myfile.close();
- myfile.open("qrel.txt");
- myfile << qrel;
- myfile.close();
- Xapian::MSet mymset = enquire.get_mset(0, 10);
- Xapian::prepare_training_file(get_database_path("apitest_rset").c_str(),"query.txt","qrel.txt",10);
- return true;
- }
Add Comment
Please, Sign In to add comment