Unexpected results on AND mode in search
Posted: 27 Jan 2019 11:17
I am getting very unexpected results using AND in searches. Not sure whether it is my misunderstanding, or whether there is some sort of a bug involving (particularly) the way in which comment tags are handled. Normally one would expect AND to produce the union of the two independent searches, but this is not what happens. Take this example:
Search 1: Looks for all files with the tag latexdone on my X drive, using
X:\?tags:latexdone /r /t
The result is correct showing 2766 items all of which have that tag:
Search 2: Looks for all files with a comment using
X:\?!cmt:"" /r /t
As far as I can figure out the only way to do this is to do an inverse search on the tag database looking for null comment as above. The result too is correct showing 3 items with a comment (none of which happen to have the Latexdone tag)
Search 3: Looks for all files with both of the above using
X:\?!cmt:"" & tags:latexdone /r /t
As it happens I am using click and search but that is by the by
The result here should be no files. However the union picks up 23 files, none of which are in the union of searches 1&2, but all of which have any unrelated entry in the tag database (any comment or label) and do not have the latexdone tag.
What is wrong with my syntax?
What it is picking up is all files in the tag database which do NOT have the latexdone tag. I cannot work out how that fits with the syntax, or the operation of the AND facility in the click and search.
Search 1: Looks for all files with the tag latexdone on my X drive, using
X:\?tags:latexdone /r /t
The result is correct showing 2766 items all of which have that tag:
Search 2: Looks for all files with a comment using
X:\?!cmt:"" /r /t
As far as I can figure out the only way to do this is to do an inverse search on the tag database looking for null comment as above. The result too is correct showing 3 items with a comment (none of which happen to have the Latexdone tag)
Search 3: Looks for all files with both of the above using
X:\?!cmt:"" & tags:latexdone /r /t
As it happens I am using click and search but that is by the by
The result here should be no files. However the union picks up 23 files, none of which are in the union of searches 1&2, but all of which have any unrelated entry in the tag database (any comment or label) and do not have the latexdone tag.
What is wrong with my syntax?
What it is picking up is all files in the tag database which do NOT have the latexdone tag. I cannot work out how that fits with the syntax, or the operation of the AND facility in the click and search.