#!/bin/sh
+[ "$1" = "no" ] && shift || args="-A -p 2"
+
cd ~/recoll
-idx="-c main"
+args="$args -c main"
while : ; do
[ -d "$1" ] || break
- idx="$idx -i $1/xapiandb"
+ args="$args -i $1/xapiandb"
shift
done
-recollq $idx -A "$@" 2>/dev/null | perl -ne '
- if (/^ABSTRACT/../^\/ABSTRACT/) {
- print "\t$_" unless /^.?ABSTRACT/;
+recollq $args "$@" 2>/dev/null | perl -ne '
+ if (/^(ABSTRACT|SNIPPETS)/../^\/(ABSTRACT|SNIPPETS)/) {
+ print "\t$_" unless /^.?(ABSTRACT|SNIPPETS)/;
next;
};
next unless /^(.*)\t\[file:\/\/(.*)\]\t\[.*\]\t\d+\t.*\t.*$/;
print "$2\t$1\n";
-' | spc -e grn,"(^/.*)"
+' | spc -e grn,"(^/.*)" | less