Regarding the ability to index attachments separately from the node text, one can do the following :
1. Modify driver to retrieve attachment id along with path
2. Add "search_index($attachment['id'], 'attachment', $attachment_text);" to function search_attachments_nodeapi so text is indexed with type="attachment".
3. Create function "search_attachments_search"(hook_search) and add "name" => "Files",
"search":
a) $find = do_search($keys, 'attachment');
b) Ask driver to retrieve items with $find->sid (node id included)
c) Wrap & return results according to hook_search rules (snippet is parsed from {search_dataset})
Done! We have "Files" tab and can search attachments only (+ node backreference link in result).
I believe it is better than what is done now, because it is impossible to find out which attachment has the information I search for when node has 2+ attachments.
The ability to index attachments separately from the node text.
Regarding the ability to index attachments separately from the node text, one can do the following :
1. Modify driver to retrieve attachment id along with path
2. Add "search_index($attachment['id'], 'attachment', $attachment_text);" to function search_attachments_nodeapi so text is indexed with type="attachment".
3. Create function "search_attachments_search"(hook_search) and add "name" => "Files",
"search":
a) $find = do_search($keys, 'attachment');
b) Ask driver to retrieve items with $find->sid (node id included)
c) Wrap & return results according to hook_search rules (snippet is parsed from {search_dataset})
Done! We have "Files" tab and can search attachments only (+ node backreference link in result).
I believe it is better than what is done now, because it is impossible to find out which attachment has the information I search for when node has 2+ attachments.