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?
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?
The search I'm trying to create is "Title contains cuttlefish or Title contains cephalopod".
"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.
The fact that saved searches work should help to localize the problem if anyone is paying attention.
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.)
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?
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
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.
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...
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 ?
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
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?
To support unsaved advanced searches we probably need to add some additional UI to the advanced search window. Ticket created.