On Sun, Feb 16, 2014 at 8:34 PM, Jonathan Otsuka <djg...@gmail.com> wrote:
> Is there an interface yet to the wiki? I have been wanting to change/add a > few things. > There's a library interface for loading/storing wiki content: http://fossil.wanderinghorse.net/repos/libfossil/doxygen/fossil-content_8h.html#a47f91b6c7f68877b578a4cb20ed07fbd but not yet a script-side interface. libfossil also does not do fossil's wiki parsing - that will eventually be ported into a higher-level layer. I want to add a full text search for wiki bodies. > The API gives you enough tools to fetch the contents of each version for your indexing purposes. i don't see an API for fetching historic versions of a page, but recently wrote an SQL query to fetch that history[1], so that feature's just a matter of time. I guess I could look into adding that into normal fossil. > Doing a real-time search across all versions would (IMO) not be feasible, in terms of performance. Fetching historical versions of content is extremely memory hungry - it can easily cost a total of 100MB in de/re-allocations to fully resolve a small file's contents through the generations (peak memory is normally much lower). However, collecting and indexing the (immutable) data is not generically a problem. Indexing the wiki pages when they're saved would also be a good idea, and libfossil provides a callback hook which clients can use to be notified of artifacts being saved (which includes wiki pages). That could also be used to take it to the next logical step and index file content when it arrives. [1] = http://fossil.wanderinghorse.net/repos/libfossil/index.cgi/finfo?name=sql/q-wiki-lineage.sql -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users