Simultaneous searching inside a collection and its subcollections

Hello,

I use Zotero Standalone to organize my (indexed) PDF documents. I have collections and subcollections. I would like to search (in the titles or in the files content) for a given word or phrase. When I use the "fast search" box in the main window, it looks only into the collection I click on (without subcollections). When I use advance search (a click on a collection and then e.g. click on the magnifier button) it looks always into all my PDF files (as in the case of "fast search" in My Library) - it does not depend on the options I can tick in the search window. Using "fast search" box along with the recursiveCollections option could be a way but it would make a mess into my files.

Does anyone have a possible solution? Thank you in advance.
  • Using "fast search" box along with the recursiveCollections option could be a way but it would make a mess into my files.
    I don't understand what you mean. If I'm understanding you, recursiveCollections does exactly what you're asking for.
  • right, but if you've set up your collections in a way that that doesn't make sense with recursive collections it's not a great solution.
  • Thank you for your comments. @Dan Stillman - yes, it should do the kind of searching I have in mind, but as adamsmith mentioned - this is not an elegant solution. Let me explain in other words.
    I see the Zotero collections as MS Windows folders and items as files. In Windows I have folders containing both files as well as other folders. It is because I do not want to make a special folder (collection) for these files (items) which do not fall into any sub-category. Windows search looks for files in subfolders by default; Zotero has this option, but it does not seem to be working (that is why I created my post in the Troubleshooting).
    The recursiveCollections option simply multiply the entries coping them to all upper-folders (ok, it makes "shortcuts" rather than copies). This is not a smooth solution as now finding the previously not sub-categorized files is impossible (depending of the amount of items).
    Do you maybe have any other suggestions?
  • I still don't understand what you're saying. recursiveCollections doesn't change your data in any way — it's just a display setting, so I'm not sure how you think it would "make a mess" of your items. Can you provide a concrete example of what you're trying to do, what exactly happens, and what you'd like to happen?

    http://www.zotero.org/support/reporting_bugs#provide_steps_to_reproduce
  • I think what s/he is trying to do is quite straightforward: Collection to be set to their non-recursive default display and a recursive search option.

    Use case:
    I have a collection "Labor Markets" that contains generic research on labor markets as well as a number of subcollections with regional and/or countr studies. So I don't want the content of the subcollections appear at the parent level and I have recursive collections turned off.

    Now I want to look at all research mentioning minimum wages, so I type "minimum wage" into the search field. Right now this will just give me the results from the generic studies and nothing from the subcollections. I have two options now:
    1. Go to about:config, type recursiveColl into the filter, toggle the pref, go back to Zotero, switch to another collection and back, retype "minimum wage" and once I'm done switch recursive collections back or
    2. Go to advanced search, search for "Collection --> is --> "Labor Markets" and "Title" --> contains --> "minimum wage" and check the "include subcollections" box. (though since we don't have an "everything" condition for the advanced search this will not quite be the same.


    Both of these options are a bit complex. Can we find something simpler?
  • edited February 14, 2014
    OK, that makes sense — and yes, those are the two current options, though I agree that they're fairly complex. (I'm still not sure what mgrmatti was saying wasn't working, though.)

    One thing that we've long considered is the ability to toggle recursiveCollections via either the gear menu (or somewhere else global in the UI) or a collection's context menu. I think the latter is probably too complicated — while I don't think they'd need to sync, there'd probably need to be different collection icons to indicate the different modes, and I think toggling this on and off for all your collections would be pretty annoying. So I think we're looking at a global setting, as it is now — just more accessible.

    (The problem with applying it to the quick search (e.g, with a checkbox in the search mode drop-down) is that it wouldn't apply to tags, which I think it would need to.)
  • One thing that we've long considered is the ability to toggle recursiveCollections via either the gear menu (or somewhere else global in the UI)
    Gears Menu sounds like the best place to me. So I'm envisioning an menu item between "Export Library" and "RTF-Scan" that changes contextually between "Enable Recursive Collections" and "Disable Recursive Collections". Does that sound good? Would you take a patch for that?
    (I'm still not sure what mgrmatti was saying wasn't working, though.)
    pretty sure they misunderstood the option in the advanced search. It's a bit confusing that the "include subcollections" checkbox is always displayed, but only relevant "Collection" is one of the search conditions.
  • So I'm envisioning an menu item between "Export Library" and "RTF-Scan" that changes contextually between "Enable Recursive Collections" and "Disable Recursive Collections".
    Eh, I don't really like that.

    What about a local, library-specific setting, configurable from each library's context menu, similar to Show Duplicates and Show Unfiled Items?

    For the wording, "Recursive Collections" is too technical. "Show Nested Items"? Other ideas?
  • edited February 14, 2014
    Or maybe per-library isn't worth it and I was just reacting to your proposed wording. Not sure. Per-library is a little bit more complicated to implement, but doable — probably some JSON in a pref, with the existing setting migrated and removed. (New libraries would default to off.) There'd still be the issue of giving some indication in the UI that the behavior was different for different libraries, though. Thoughts?
  • I think I mostly dislike that the gear menu is technically the "Actions" menu and doesn't currently have anything like this in it, so nestling it in with Import/Export seems weird to me.
  • You're right on the wording. Show Nested Items is better, I'll see if I can think of anything else.

    My concern with the right-click on library option is how hard to find it is. Very few people are aware that that right-click option even exists. Another Option would be under "Interface" in the General tab of the preferences, though that is already pretty crowded. That would seem like a natural place, though?
  • Another Option would be under "Interface" in the General tab of the preferences, though that is already pretty crowded. That would seem like a natural place, though?
    Sure. It just doesn't do much for quick toggling.

    I guess my general concern here is that this is somewhat of an advanced feature — it presents your item list in a way that doesn't really exist, which has repercussions for various things. For example, I believe reports or bibliographies generated from the collection won't actually include the descendent items, since only the items pane itself looks at recursiveCollections. The setting is also pretty much never tested by us. I'm actually amazed there's never been a bug with it.

    But since a lot of people seem to be using it anyway, maybe that ship has sailed and we should just put it in the prefs.
  • Sure. It just doesn't do much for quick toggling.
    True, but it's 4 vs. 2 clicks and people who want to be hardcore can configure a keyboard shortcut via keyconfig
    . For example, I believe reports or bibliographies generated from the collection won't actually include the descendent items
    that's true for reports, but not for bibliographies (??? but I just tested twice). That means it may be possible to fix for reports as well. For translators we're already increasingly using the getCollections option anyway.

    And yes, people really like that option a lot.
  • edited February 14, 2014
    I've always envisioned the toggle as a button in the toolbar. I generally use recursive collections, but often find myself wanting to toggle it momentarily. In general, I don't see why the toolbar cannot be made customizable.
  • edited February 17, 2014
    Thank you for the discussion.
    @adamsmith - you are right, I was just confused with the "include subcollections" checkbox always displayed active. In addition, the advance search option IMHO would be more intuitive in use if the fields like "title", "author", "journal" were separated on the condition list by a horizontal line from "collection" or even from "attachment content" (due to the simple alphabetic order it was hard for me to spot them).
    The discussion on the essential search option became a bit technical for the. Recently I introduced Zotero in my department as an alternative for printing many documents or some other software. However I am afraid that if a lot of people do not know that the "right-click option even exists" (as adamsmith mentioned), explaining them the idea of e.g. recursiveCollections might be a bit too much. Maybe it would be a good idea to make the fast search option similar to the one in MS Windows (this one is very intuitive), i.e. if you would like to search inside a collection (with subcollections by default), simply click on it in the collection tree, type the phrase in the fast search box and press enter. (eventually there could be a checkbox just next to, for including the subcolllections or not in the search). What do you think?
  • I don't really see a reason why a search in a collection should necessarily include subcollections or why that's somehow more intuitive. Just like recursive and non-recursive collections, they're just two different ways of thinking about organization
    (And I'd really discourage the analogy to Windows folders as collections work very differently—one item can be in multiple collections, if you delete it, it disappears from all collections, it you change it, it changes in all collections—and you're going to confuse people by speaking of collections like folders).

    I don't think a checkbox is a good idea, no. Too much small things happening in the toolbar already.
  • Fair enough. Nevertheless, I would like to be able to switch the behavior of the fast search in advanced options (so that I can look inside subcollections by default, without the need of recursiveCollections nor advanced search).
    Probably all this thread should have been posted in Feature Requests, sorry for that.
  • edited May 13, 2016
    Hello,

    I reopen this thread today on the advice of Dan, after the request I've done on the zotero-dev list (https://groups.google.com/forum/#!topic/zotero-dev/9VqKdSuvPuA).

    For my part, I'm thinking about a easy way to switch this « Show nested items » (I really like this wording !) for a while. I've initially imagined a toggle button on the top of the zotero panel, in the toolbar (as @aurimas suggests), for example next to the advanced search's one. As @adamsmith, I'm agree to say this is just a two different ways of thinking about organization. For this reason, I think important to turn it into a real tool (and not only a hidden option for specialists) and to promote it as such.

    After reading this thread (and in order to help to bring the issue forward), I think that there is one central question which must be determined. What's target audience ? Once that will be decided, things would be simpler :
    * if the feature is for all users : we probably have to implement a visible and accessible button, with a meaningful icon, in the toolbar for example. In this case, it seems not useful to permit different configurations "per-library" or "per-collections".
    * if the feature is for "hardcore" users : Dan's idea of context menu sounds good, because the option will be invisible by non-expert users, and because each collection (or library) could have his own configuration (with the off by default).

    I hope that can help to get things done,
  • I disagree with that distinction. Zotero makes use of context menus extensively and they're not just for hardcore users. E.g. key functions such as exporting and copying bibliographies to the clipboard are achieved through context menus.

    Unless the toolbar is customizable (which I don't think is worth investing into as long as Zotero is on xul), I don't think it makes sense to put this at the same level as "Create New Item" "search" or "Add Attachment".
  • I don't think it makes sense to put this at the same level as "Create New Item" "search" or "Add Attachment".
    What about a button put more to the right, next to the quick search field ? After all, the latter is also used as displaying feature, isn't it ? We may consider these two functions as differents ways to search, to surf in collections...
  • My point is more that "search" "attach" and "create new" are very basic functions of a reference manager, that we should expect as one-click toolbar options.

    "Change how collections and subcollections relate" is certainly a useful feature, but hardly at the same level. Given that toolbar space currently is quite scarce (taking into account smaller displays), I just don't see it. I also really don't buy that putting something into a context menu somehow makes it undiscoverable.
  • OK, you're not wrong. Your arguments are making sense. But, I confess I don't see very well what are the remaining alternatives...
  • Of the currently available options, I'd guess Dan's right-click per library option is the best. As per the above, I had always envisioned this in the preferences, but that does make it harder to use quickly and there's no obvious space for it.
  • Right-click per library would be great. Right-click per collection and subcollection would be even better (but more complicated to implement, it's true). With a specific entry in the keyboard shortcut panel, it would be perfect.
  • I've whipped up a tiny plugin for this issue @ https://github.com/minj/zotrecsrch

    Because 4 clicks are 3 too many
  • @LA-MJ Could you provide more information on how to install your plugin please? I download the .zip file from the Github page but I don't know what to do with it once downloaded as it doesn't install like a typical plugin.

    Any help would be greatly appreciated.
  • Just zip it up, rename it to .xpi and try it?

    Or try a proxy file method: https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment#Firefox_extension_proxy_file

    Honestly, I am not really using zotero any more and have no idea whether XUL even works there still. Last time I've heard anything about it, they were going for electron-builds, I think.
  • (Zotero still uses .xul/xpcom and generally there is a good chance this will work, though I think you'll have to bump the max version for Zotero in install.rdf)
  • @LA-MJ and @adamsmith

    Perfect, thanks ever so much. I just had to go into the install.rdf and increase the max version to 5.* and that's it working perfectly.

    All resolved now, many thanks again!
Sign In or Register to comment.