SID-01292: Searching comments in attachment with generic search
| Status: |
Answered |
TWiki version: |
5.1.0 |
Perl version: |
|
| Category: |
CategorySearch |
Server OS: |
|
Last update: |
14 years ago |
I need to search the comments within attachments, but I cannot get a generic search on comment to work.
For example I want to search topics that have an attachment that has a comment beginning with 'Unicode'
The following search with a generic search string produces nothing.
SEARCH{"attachments[comment='Unicode*']" type="query"}
If I enter the full document comment it finds the topic with the attachment.
Is there any other way to search within attachment comments?
--
RonMascarenhas - 2011-10-12
Discussion and Answer
I don't think that the standard search will actually look
within attachments. It will only look at the metadata related to those attachments (name, size, etc.). You need to install a separate plugin/search engine for that. See:
Extensions:attachments
--
AaronLWalker - 2011-10-12
Searching for attachments comments should work. Make sure you use the wildcard operator if you use wildcards, such as
"attachments[comment~'Unicode*']" (this is untested).
Details in
VarSEARCH,
FormattedSearch,
QuerySearch and
IfStatements
--
PeterThoeny - 2011-10-12
The wilcard works! Thanks. This is my search:
%SEARCH{"attachments[comment~'Unicode*']" type="query"}%
--
RonMascarenhas - 2011-10-13
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.