I'd like to specify database fields in the Quicksearch bar

I read somewhere on the forums or Zotero's trac site that there is a preferece slated to be introduced to turn OFF the quick search bar entirely. I support this. After my database got to a certain size, I never used quick search again. It's just too painful not to be able to see what you are typing for 5+ seconds.
I was very happy to learn about double-quote-first feature, which disables quicksearch for a single search. But I'm forever typing single quotes or colons, or other stray keys. So I'll be glad for the chance to turn incremental search off.

Now, once incremental search is turned off, it would be great to have a very rudimentary way to quickly specify which field you want the (nonquick) search to look in. I know about Zotero's full search, and use it all the time, but getting "all items with author X" could be made very slick if the search bar would allow something like a very basic searchbar syntax.

The following three would be wildly useful:

c Dost [search for "Dost" in "creator" field, finding a certain Russian author]
t crime punish [search for these strings in "title" field]
k stein grapes wrath [search for these "keywords" in the common bibliographic metadata fields (possibly creator, title, abstract, extra)

Anything else and I'm happy to go to the full search dialogue, but a few more possibilities come to mind:

y >2005 [all the most recent stuff]
f search terms here [find these in fulltext items]
n search for the following in notes

Of course it would be possible to set it up to combine queries for different things, with quotes around the search terms or whatever, but for me you'd get 95+% of the benefit with just the simple, superquick options listed above.

  • Scot, personally, I like these ideas. However, I'd prefer that a standard search syntax (such as CQL) would be used for this. CQL would allow for very simple queries such as these:

    crime AND punish

    but would also allow to target particular fields, the use of booleans, or grouping with parens, etc:

    creator = Dost
    creator = Dost AND year > 2005
    creator = Dost OR (title = crime AND year > 2005)

    More info about CQL:

    CQL: Contextual Query Language
    A Gentle Introduction to CQL

    I think that this comes close to your proposed syntax, at least if one would be able to specify shortcuts for field names in the Zotero prefs.

  • @ Matthias: I like the idea of adding CQL to zotero's command/search line. But a "pure" CQL implementation would still lack what I most want: ultra-easy search entry for the kinds of search I do most. When reading or searching online databases, I do this kind of thing all the time:

    "Ah, now there's an interesting article/book/whatever. Title looks good. I'd better get it in my database, and perhaps see if I can lay my hand on it. On second thought, it looks vaguely familiar. I may well have it already..." At this point I open Zotero to look for the thing and I either: (1) use the quick search bar with an initial double quote. But I have a lot of full text articles indexed, so any search terms (names or keywords) in my search are likely in the database a few dozen times already. I get too many results and have to scroll through them and eyeball the list to find what I'm looking for. or (2) use advanced search. It's impeccably functional, but also slow to manipulate. The list of fields is long. What I want most is 'creator,' which is right in the middle. I hunt it down with the mouse or press 'C' until I land on it (9x).

    I was inspired to the above idea by a few very functional search bars I have seen lately with single-character directives. Opera's search/location bar works like this ("g TERM" = search google; "y TERM" = search yahoo, etc.). Tiddlywiki has a simple search prefix. I forget the exact prefixes, but they are something like: "+TAG" to limit a search to tags, "@TITLEWORD" to limit it to title words, and another prefix to search only body text. All you do is prefix a single non-alphanumeric ('+', '@', etc) to your search term. I use a text concordance tool for searching biblical text which does something similar: a single dot prefix ANDS the search terms, a single quote makes a phrase search. It's great.

    I do like the idea of CQL on the Search bar. I like it a lot, not least because I like my search results in the main window, rather than the AdvSearch pane, but what I most want at the moment is a way to get dead-quick access to words in the creator. title and date (year) fields, so that I can see whether I have an item in my database, and find it if I do. Think of how nice Firefox's search-in-page (with '/') is, or the in-page search mechanisms the unix tools (less, vim, info). If I could hop around my database like that, I'd die happy.

    Perhaps it would be possible to do both. Implement CQL. It's powerful, standardized, and above reproach. But implement one or more preset searches using a single-key directive as well, either as I suggest above or using a single-key non-alpahnumeric prefix).

    Here's a simplified suggestion: A prefixed '.' on the search bar means "search for all of the following terms in creator, title, and year fields." For example:

    .steinbeck 1962
    .steinbeck grapes
    .dost war peace

    You could add a few others if necessary (single quote = these words in this order, phps), but I think that for many personal research libraries, even the single suggestion above would let users hit pay dirt accurately and quickly for single-item retrieval. This (seems to me) could be very useful for the word-processor item-finder plugins as well, since single-item search is what you mostly do in them.
  • Of course ".dost war peace" should hopefully come up empty. ".tolst war peace" might have a better chance.
  • As I keep using Zotero, I like that final idea above more all the time: A prefixed '.' in the quicksearch bar would search for the search terms in some subset of the common metadata fields: title, date, creator, and, maybe journal title and journal abbrevs. This would let me do the kind of searches I do most easily, without cluttering my results with the results from a fulltext search. Multiple different kinds of single-char-prefix searches (like I suggest above) would not be necessary. Just a single 'metadata-only' search type would give a lot of benefit without introducing extra complexity.

    Alternately, since I guess most people do simple item-metadata searches far more often than fulltext searches, you could make an unprefixed search just search the common metadata fields, and a dot-prefixed search do a fulltext-and-metadata search (exactly the behavior of the current QuickSearch bar).

    For more complex QuickSearch searches, CQL remains a great idea as well.
  • I'd just like to add another vote to this request for restricting quick searches to certain fields, within both zotero and the add/edit citation plugins.

    Also, if something like this becomes implemented, it would be helpful if 'creator' quicksearches could be further restricted to 'creator surname' quicksearches.
  • This is a big priority for me. The quick search needs to be quick - I'd have creator and title as the default fields. Right now it's really clumsy: you search, the many results come up with attachments expanded (turn off-able?) and then you scroll through to find the right one. If you're searching for someone who gets cited a lot then, with full text searching on, that's a big list to get through.
  • Hi,

    First of all, thanks to the Devs for the great work they do!

    However, I'd like to vote for an "Quicker Quicksearch" as well.
    I'm working with an lifescience libary and 99% of the searches I do are limited on the "creator" or the "title". Esspecially in the "Inser Citation Plugin".
    As scientific papers are higly cross-referenced, you can find the any authir in a couple of reference lists. Finally leading to the fact, that even if you look fo the specific title you find many papers refering to that one.
    Unfortunately, this renders the quicksearch unusable for me

    Any of the above suggestion wouldd be fine with me. But I would prioritise them as following (with an new option in #2)
    1) "opera keywords system" like cr=Gebauer ti=something.
    2) Kind of Dropdown to restrict search (like FireFox search bar)
    3) An option restricting Quicksearch to certain database fields. (Simple tom implement?)
    4) Introduce CQL


    PS: I would prefer "collapsed" entries after the search as well...
  • PubMed uses a series of tags or field codes set off by square brackets, which makes it easy to just type the search you want eg:
    tolstoy[au] (tolstoy as a listed author)
    tolstoy[1au] (tolstoy as the first author)
    "war and peace"[ti] for title
    tolstoy[au] AND war[ti]
    "all happy families are alike"[tiab] quoted phrase in title or abstract (yes, I know its a different book, but nobody remembers the first lines of W&P)
    and so on--[tw] is textwords, [ad] for institutional affiliation, [ta] for journal title...
  • I've implemented a drop-down menu for the quicksearch bar on the trunk (for the next major version after 2.1).

  • that's great - very excited. thanks Dan!
Sign In or Register to comment.