Parent/child relationships cause search problems

I have a collection with items that either have a pdf attachment or a note indicating where the hard copy can be found. I want to do a search that will show all the items with pdf attachments in this collection. I put in the search criteria "Collection - is - My Collection" and "Attachment type - is - PDF" and get nothing. It seems the problem is that the "Attachment type" criterion returns the attachment itself instead of the parent item and the child attachment does not belong to the parent collection. This seems counterintuitive to me as I would interpret the criterion to mean "Find the items that have a PDF attachment" instead of "Find the attachments that are PDFs." This may seem like a small difference but it makes the search I want to do impossible.
I don't know if there is a way to fix this without messing up other parent/child behaviors and search functionality but I have two suggestions

1. Automatically assign child items to the parents' collection OR

2. Have two separate search criteria; one that returns the items with pdf attachments and one that returns just the attachments themselves.
  • Another related issue: I have notes that tell me where to find each reference and because of the relationship of notes to the parent I can't do a search for references with a specific note and a specific tag. It seems that it is impossible to combine any search criteria regarding notes or attachments with any other search criteria because the notes and attachments have none of the attributes of the parent. It would be nice if notes and attachments behaved like tags in searches so you could combine search criteria for them with other criteria.
  • edited July 26, 2007
    i believe you can use a "child note" search to find parent items, i.e. you can search for "child note" contains [your reference info] and (parent) "tag" contains [whatever your tag is].
  • I hadn't seen that search option. Thank you. However, that still doesn't solve the problem for attachments. I don't see a search option for "child attachment type" or "child attachment content." I want to do a search that will return all of the articles in a collection that have a pdf attachment. Is that something that could be added pretty easily?
  • Ticket created that should address this.
  • This sort of search is now possible in 1.0.0rc2, which features a new "Include parent and child items of matching items" checkbox in the Advanced Search window.
Sign In or Register to comment.