diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-06-03 21:14:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-06-03 21:14:56 -0400 |
commit | 44fde6cbff2aaa8d647084721320111e8807ea74 (patch) | |
tree | fd23e3d08b1748a2d3822bc1551254977f512514 /doc/todo/different_search_engine.mdwn | |
parent | 8a9be51d61e18d0c054438881646665b16cda61f (diff) | |
download | ikiwiki-44fde6cbff2aaa8d647084721320111e8807ea74.tar ikiwiki-44fde6cbff2aaa8d647084721320111e8807ea74.tar.gz |
first pass at doing xapian indexing
Still some TODOs to fill in.
Diffstat (limited to 'doc/todo/different_search_engine.mdwn')
-rw-r--r-- | doc/todo/different_search_engine.mdwn | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/doc/todo/different_search_engine.mdwn b/doc/todo/different_search_engine.mdwn index 3737fb140..788473ec5 100644 --- a/doc/todo/different_search_engine.mdwn +++ b/doc/todo/different_search_engine.mdwn @@ -33,35 +33,25 @@ Possibilities: written on the page would be indexed. Not text generated by directives, pulled in by inlining, etc. There's something to be said for that. And something to be said against it. It would also get markdown formatted - content, mostly, though it would still need to strip html. + content, mostly, though it would still need to strip html, and also + probably strip preprocessor directives too. * `sanitize` - Would get the htmlized content, so would need to strip html. - Preprocessor directive output would be indexed. + Preprocessor directive output would be indexed. Doesn't get a destpage + parameter, making optimisation hard. * `format` - Would get the entire html page, including the page template. Probably not a good choice as indexing the same template for each page is unnecessary. -Currently, a filter hook seems the best option. - The hook would remove any html from the content, and index it. -It would need to add the same document data that omindex would, as well as -adding the same special terms (see -http://xapian.org/docs/omega/overview.html "Boolean terms"). - -(Note that the U term is a bit tricky because I'll have to replicate -ominxes's hash_string() to hash terms > 240 chars.) +It would need to add the same document data that omindex would. The indexer (and deleter) will need a way to figure out the ids in xapian of the documents to delete. One way is storing the id of each page in the ikiwiki index. The other way would be adding a special term to the xapian db that can be -used with replace_document_by_term/delete_document_by_term. omindex uses -U<url> as a term, and I guess I could just use that, and then map page -names to urls when deleting a page ... only real problem being the -hashing; a collision would be bad. - -At the moment, storing xapian ids in the ikiwiki index file seems like the -best approach. +used with replace_document_by_term/delete_document_by_term. +Hmm, let's use a term named "P<pagename>". The hook should try to avoid re-indexing pages that have not changed since they were last indexed. One problem is that, if a page with an inline is |