[Xapian-discuss] C++ parser for doc.get_data() result.

Kevin Duraj kevin.softdev at gmail.com
Wed Sep 30 23:04:44 BST 2009


Xapians!

Did anybody wrote and would like to share a routines that parse result
from doc.get_data() into some key and  pair values in C++ ?

Code:
Xapian::Document doc = i.get_document();
string data = doc.get_data();
mymap = parse_result(data);

As you know the data string contain all the data within the document
delimited by "=" sign and "\n" new line and needs to be parse into key
and values. I know that we can assign values during indexing  and
retrieve it as: doc.get_value(1), but I think that this has a overhead
and would show to be slower when indexing and retrieving millions of
documents. Please correct me if I am wrong, thank you.

PS: I don't have any friends so I started http://find1friend.com/
*lol* runs on Xapian!
Kevin Duraj



More information about the Xapian-discuss mailing list