Implement anchored searches: terms to be found at a maximum distance of the start or end of the text

This commit is contained in:
Jean-Francois Dockes
2011-09-20 16:42:56 +02:00
parent 5a6534113b
commit ee0d602ab3
9 changed files with 210 additions and 43 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
topdir=`dirname $0`/..
. $topdir/shared.sh
initvariables $0
(
for q in \
'"^anchortermeaudebut"' \
'"^ anchortermeunpeuplusloin"' \
'"^anchortermeunpeuplusloin"o30' \
'"^ anchortermeunpeuplusloin"o30' \
'"anchortermenullepart"' \
'"^anchortermenullepart"' \
'"anchortermenullepart $"' \
'"anchortermeunpeumoinsloin$"o30' \
'"anchortermeunpeumoinsloin$"' \
'"anchortermealafin$"' \
'title:"^anchortitlebegin"' \
'title:"^anchortitleend"' \
'title:"anchortitleend$"' \
; do
echo $q
recollq -q $q
done
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
checkresult
+34
View File
@@ -0,0 +1,34 @@
"^anchortermeaudebut"
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
"^ anchortermeunpeuplusloin"
0 results
"^anchortermeunpeuplusloin"o30
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
"^ anchortermeunpeuplusloin"o30
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
"anchortermenullepart"
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
"^anchortermenullepart"
0 results
"anchortermenullepart $"
0 results
"anchortermeunpeumoinsloin$"o30
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
"anchortermeunpeumoinsloin$"
0 results
"anchortermealafin$"
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
title:"^anchortitlebegin"
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes
title:"^anchortitleend"
0 results
title:"anchortitleend$"
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/anchor/tryanchor.html] [anchortitlebegin anchortitlemiddle anchortitleend] 1463 bytes