apt-xapian-index now comes with a query tool I've just uploaded a new version of apt-xapian-index to unstable. Now it comes with a little query tool called axi-cache. You can search this way:
In fact, you can use most of the things described here. You can then say
axi-cache search foo bar baz facet::tag sec:section
axi-cache moreto get more results, or
axi-cache againto retry a search, or
axi-cache again wibble wabbleto add keywords to the last search. This allows to start with a search and tweak it. In order to work it needs to save the last search so
morecan amend it. Searches are saved in
~/.cache/axi-cache.state. You can search tags instead of packages by adding
--tags. It will suggest extra terms for the search, and also suggest extra tags. It can even correct spelling mistakes in the query terms once the index has been rebuilt with this new version of
update-apt-xapian-index. I need to thank Carl Worth who, with notmuch, reminded me that if I just build a nice interface on top of Xapian's query parser I go quite a long way towards making a Xapian database extremely useful indeed.
axi-cachealso integrates with bash-completion so that tab completion is context-sensitive to the command line being typed:
Thanks to David Paleino who wrote the bash completion script. Just for reference, this is the command line help:
$ axi-cache search image pro probability process processors programmability provides problem processing production pronounced proving $ axi-cache search kernel pro problems processor production proved provided processing processors programming provide provides
If you install the package for the first time, you may need to rebuild the index by running
$ axi-cache help Usage: axi-cache [options] command [args] Query the Apt Xapian index. Commands: axi-cache help show a summary of commands axi-cache search [terms] start a new search axi-cache again [query] repeat the last search, possibly adding query terms axi-cache more [count] show more terms from the last search Options: --version show program's version number and exit -h, --help show this help message and exit -s SORT, --sort=SORT sort by the given value, as listed in /var/lib/apt- xapian-index/values --tags show matching tags, rather than packages --tabcomplete=TYPE suggest words for tab completion of the current command line (type is 'plain' or 'partial')
update-apt-xapian-indexas root before using axi-cache.