» tagged pages
» logout
Xapian
Return to Xapian General Mailing List

Re: using xapian for indexing mails

Tags Applied to this Entry

1 person has tagged this page:
You want XapianTermGenerator, which takes a blob of text and adds all the words in it to Xapian. e.g. (snippet of the written-in-PHP http://sandwich.ukcod.org.uk/~matthew/subtitles/?source=1#indexer ): $indexer = new XapianTermGenerator(); $indexer->set_flags(128); $indexer->set_database($db); # For spelling [... then for each document ... ] $doc = new XapianDocument(); $indexer->set_document($doc); $doc->set_data( [...] ); $doc->add_term( [...] ); $doc->add_value( [...] ); $indexer->index_text($text); $db->add_document($doc); ATB, Matthew
Username:
Password:
(or Cancel)