unexpected search results

When I search using "Match all of the following," the results show only matches stored in the My Library folder--matches in group libraries are not shown.

When I search for items using "Match any of the following," I get every item I have in every library, regardless of the search term.

So far I've tried Title, Creator, and Notes, and the behaviour has always been the same. Changing the operator around ("is", "contains", etc.) doesn't make a difference, and neither does ticking various combinations of options below the search field.

Is this a bug, or am I doing it wrong?
  • I've also been experiencing some flakiness with advanced searches in 2.0b7.2 as well. If I try to search the title field for two words using the "any" option, then I get everything in my library. If I save the search, then it works correctly!

    The search I'm trying to create is "Title contains cuttlefish or Title contains cephalopod".
  • bump. So, no one else has this problem? It's a frustrating one for me, because I rely on search heavily, and it's pretty much completely broken for my group libraries. Anyone have suggestions? Thanks!
  • I am using v2.0b7.2 with Firefox v3.5.3 and can confirm the same (mis)behavior as noted by Jason.

    "Advanced Search > Match all" will grab entries containing the terms in My LIbrary, but not in the Group Libraries.

    "Advanced Search > Match any" will grab every entry in My Library, regardless of whether a real match occurs. Neither search will descend into the Group Libraries.
  • Jason, as I commented before, the advance search seems to work properly when you save it. You could try creating a saved search that you edit as needed. It's not the best solution, but it might help.

    The fact that saved searches work should help to localize the problem if anyone is paying attention.
  • Thanks, fredbacon, but unfortunately I'm having no better luck when I save the searches. I still get results from My Library, but nothing from my group libraries. It's funny, because autosuggest will cheerfully throw up titles from my group library...but when I search, nothing.
  • Trying to bump this to the top of the list. Do the developers just not care?
  • I also have problems with search. Simple phrase search (as in Google "this phrase") doesn't seem to produce sensible results. Just typing in the words (this prase) leads to results in which the two words perhaps do occur, but not close to each other. In any case, my subjective experience is that the search results are erratic as soon as you try searching for more than one word. The algorithm could probably use quite a few tweaks.
  • I also have problems with search. Simple phrase search (as in Google "this phrase") doesn't seem to produce sensible results.
    Mark: Are you talking about quick search or the Advanced Search window? This thread is about the latter, so please start a new thread if you're referring to the quick search. If Advanced Search, don't use quotation marks—all fields in the Advanced Search window are phrase searches. Either way, we'd need more detail on what exactly you're searching (collection/search condition/etc.).

    Jason/Fred: We'll take a look at those issues. (Lack of advanced searching in group libraries isn't a bug—it's just not implemented.)
  • Let me know if there is anything I can do to help. Since my library mixes work and hobby interests (along with just plain curiosity), I rely on saved searches to help keep things organized. Right now, I can't iteratively create a search before I save it since having more than one condition results in everything or nothing being selected. However, the same search works correctly when it is saved.
  • edited October 15, 2009
    I think that I may understand what is happening. I turned on logging to see what is happening behind the scenes. When I use the Advanced Search dialog to create my search, the following is added to the WHERE clause:

    OR itemID NOT IN (SELECT itemID FROM items WHERE (libraryID=?))

    This clause is not used when I make this a Saved Search. I'm not entirely sure what that clause is doing. It seems to be true when an item is not in a group library. That means that it evaluates to TRUE if the item is in my regular library. Because it's an OR clause, the entire expression evaluates as TRUE for all items in my library. That's why I see everything in my library.

    If you choose to match "All" criteria rather than "Any" in the Advanced Search dialog, then the problematic clause is ANDed rather than an ORed to the WHERE condition. It should always be ANDed to work as you intended. I hope this will point you to the relevant section of code which needs to be fixed.

    But this begs the question, why are you including this clause at all? Without it the search would include items from the user's group libraries, which is what Jason was wanting. Is there a reason to deliberately exclude them? If so, then why are they still allowed in saved searches?
  • Hi,
    although the group-search is not implemented I found that it is working, somehow.

    If you do the following:
    1. Make a dummy-note in your library (not in a group) that conforms the search criteria (you will need this to be able to create a report).
    2. Have some items that conform the search criteria in a group.
    3. Save the search.
    4. Create a report of the saved search.

    With these steps, my saved search can find items in groups although they are not shown inside the search folder.

    Bug or feature?

    I am also very interested in a possibility to safe group-searches. Please let me know if there is progress.

    Thanks,
    tobi
  • For anyone who needs a workaround for this problem at the moment, here is something you can do.

    Go to your Firefox profile directory. In the extensions directory you should find a directory named zotero@chnm.gmu.edu which contains your zotero installation.

    There's a directory named chrome. In it, you will find a file named zotero.jar. This is just a zip archive. Make a backup copy of it just in case my instructions aren't clear enough for you to follow.

    Unzip the archive. It will create three directories: content, locale and skin. The file you need to modify is content/zotero/advancedSearch.js.

    Search for the string FIXME and remove the following lines

    // FIXME: Hack to exclude group libraries for now
    var groups = Zotero.Groups.getAll();
    for each(var group in groups) {
    search.addCondition('libraryID', 'isNot', group.libraryID);
    }
    //var search = _searchBox.search;

    Zip the content, locale and skin directories back up into a zip archive and name it zotero.jar. (You did make a backup copy right?)

    Restart Firefox. The advanced search functionality should work now, and you will be able to search your groups as well.

    If you have the same item in both your regular library and in a group, both copies will match your search criteria. It's not a great solution, but it's better than the current situation.
  • Thank you! I will try this later on, today.
  • I experience the same problem with v.2.0b7.4.

    The "ALL" search seems to function but the any search just matches EVERYTHING in the whole library. As though it adds an extra search string that consists of a wild card (*) which matches everything...

    This is really a big error for me. I use search all that time...
  • With luck, they will fix it in the next release. Until then, you can follow the instructions I gave above to work around the problem. If there is something in my directions which aren't clear, let me know. I'll try to clarify them.
  • This is fixed in the latest dev build, and the fix will be included in 2.0b7.6, which should be out within the next day. Thanks to Fred for identifying the problematic code (though we've fixed this such that group items won't appear, which will be the case until we have proper UI support for searching across different libraries).
  • This feature *is* important for almost any type of collaborative research, i. e. almost any kind of professional scientific work (including social sciences and humanities !). By the way, I have other group-related itches, end plan to open a new discussion on these issues.

    I tried (successfully) Fred's suggestion, and it allowed me to find references found only in my group libraries. Of course, I cannot search on collection name (useful for us), since group libraries' collections do *not* yet appear in the collections list used to create a search condition in the "Advanced search" dialog box.

    Is there a (tentative) timetable for the "proper UI support" for that feature ?
  • Bump. how frustrating to have a collaboration tool for references and not be able to search on them?
  • thinkdata: Support for saved searches within group libraries was added in late January. What I assume you're referring to, based on the other thread you created—that is, collections and saved searches from group libraries not showing up in the search condition list when you're searching within a group library—has been fixed in the latest 2.0 branch build. Try it out if you like and let us know if it works for you, and don't forget to switch back to the official release at some point. The fix will also be available in 2.0.3.
  • many thanks Dan! I appreciate the TLC :)
  • it works!

    how hard will it be to add saved searches to the website interface? As in, the same way collections appear under the group, the saved searches could too. That way I could set up a search based on tags, and my non-Zotero literate colleagues could use them.

    (no good deed goes unpunished)
    doug
  • Advanced search in group libraries apparently doesn't work on my computers (Mac OS X 10.6.3, FF 3.6.3, Zotero 2.0.3; WinXP, FF 3.6, Zotero 2.0.3):

    1. Select the group library in question

    2. Start "Advanced search", create query, click to "Search"
    - only results from "My Library" are listed (i.e. zero, if all papers to be found are in the group library)

    3. Save the search result
    - the results are the same

    Do I anything wrong?
  • confirmed for my setup. OSX 10.5.5, Z 2.0.3
  • how hard will it be to add saved searches to the website interface?
    Hard, but it's something we'd like to do.
  • ben58/migugg: It doesn't work that way currently. You have to right-click on the group and select New Saved Search.

    To support unsaved advanced searches we probably need to add some additional UI to the advanced search window. Ticket created.
Sign In or Register to comment.