Hi list, Attached is a first pass at using the Xapian backend to search Pure Data docs.
What the revision does:
search, and all subsequent searches happen very fast. Previously it searched the docs themselves every single time and depended on the OS caching the data, resulting in sluggish performance especially on Windows.
in the index were automatically chosen by the engine with no customization, and already the results are decent.
for most cases users can ignore it and type in natural language searches (like Google). And the few errors the user can generate have meaningful feedback to the console. Also, since I'm passing the input as a string you don't have to worry about malformed tcl lists or weird characters that previously caused error.
and so will get included in the results in the proper place.
couple lines of code.
checkbuttons, simplifying the interface.
"edit", the engine will take into account "editing", "edits", "edited", etc.
Installation for linux (Debian):
installed. Other distros probably have corresponding packages. 2) put search-plugin.tcl in the /startup directory, or if you're using Pd vanilla just make sure it's in a directory that's specified in the "Path" dialog. 3) Run Pd and click <ctrl-h> or choose "Search" from the "Help" menu.
Further work that needs to be done:
Linux, OSX, and Windows. The directory needs to be read/writable. Is there an easy way to do this?
so the user can cancel a long index.
Further work that could be done:
This would make it possible to type keyword:foo or author:bar to search based solely on that pd meta tag/value.
a particular object instance, i.e., object:clip
and other metadata. Right now I'm storing the _entire_ doc text in the database which obviously wastes space.
and realtime results. The latter could be very handy for autocompletion in object boxes, for example.
descriptions
As always, feedback welcome. And feel free to donate some rice and beans if you can! https://jwilkes.nfshost.com/donations.php
Best, Jonathan