find

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
thecritic
Posts: 156
Joined: Tue Aug 09, 2005 2:10 pm

find

Post by thecritic »

Thanks for another great update, Jon!

I have a couple of desiderata involving Find/Search:

1. I wish the live search box would find strings anywhere, instead of just at the beginning of "words." This is notably a problem for references that involve the Romance languages where there are can be all sorts of contractions. An live search for "homme" won't find a reference whose title includes the word "l'homme," for instance. I realize that this might slow down the search somewhat, but I think the advantages would outweigh the disadvantages. Why? It has happened on a number of occasions that I've used live search, and certain references in which I was fairly sure a string appeared were not listed. To my mind, the live search box is sort of like Spotlight, in that I expect to be able to type a string and find out wherever it is located -- for general searches, I don't want to have to remember (as I do for the Find dialog) that I need to look for a character string.

2. I'm wondering whether you might consider reworking the "Find" dialog (and eventually smart mailboxes) to be more like the configuration of a smart mailbox in Mail. Currently, the "Find" dialog doesn't allow searches that include multiple instances of the same search criterion:

Image

In other words, I can't search for references whose type is "journal article" AND "book" containing a certain string (I know that I can create virtual groups, but that is a lot more work, and isn't really suited for temporary searches). In addition, I find this dialog a bit confusing in that "words beginning with" is significantly separated from the actual text entry fields. It would be great if a "find" could include basically any combination of search criteria, even repeted instances of the same one.

What I'm proposing is something more along the lines of this:

Image

This would work for both the Find dialog and the smart mailbox configuration dialogs. By the way, unless I'm missing something, I'd love for there to be an easy way to search for references that contain attachments. Since the attachment icon doesn't occupy a column by itself in a library window, one can't sort on that.

I'm curious as to what other Bookends users think about these issues.
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Your post raises a number of different issues.

1. The Live Search uses relies on indexes to make it fast and, well, live. It would become a slow (if not glacial) search if Bookends did an unindexed search after every letter was typed. I think the convenience of a responsive live search outweighs the other considerations. I could add another option to the search popup menu (magnifying glass) to do a character search, but I'm not sure that's a good choice, either.

2. The Find could indeed be more flexible by allowing searches across fields. This would require a rewrite of the entire approach, but it's something I'll certainly consider, especially if other people think it would be useful. I don't think I'd use the +/- buttons to add/remove searches, but that really isn't necessary, and by using the current general approach (allow up to 10 fields) I could probably grandfather over smart searches already created by users.

3. There are examples of SQL searches for refs with/without attachments in the User Guide. Here is the relevant info:

In the List View, you can do an SQL Search or make a smart SQL/REGEX group that
shows all references that do or do not have attachments. The syntax is:

Show references with attachments:

varCharField REGEX '[a-z]'

Show references without attachments:

NOT varCharField REGEX '[a-z]'

To find a specific attachment, this search will work:

Locate('my attachment name', varCharField) > 0

You can copy/paste these into a smart SQL search, too.

Jon
Sonny Software
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

I support the idea of an improved GUI for the find window, along the lines of Mail.app!
Gerben
Posts: 193
Joined: Mon Aug 22, 2005 4:53 pm
Location: Florence, Italy
Contact:

Post by Gerben »

I would be in favor as well.

It would be nice to also add some flexibility in criteria for smart groups as well. I just ran into the following example: I am doing some biographical research and constructed a smart group that does a Spotlight search for the person I am interested in. This will only find references with an attachment that contains the name I want, but not references that contain the name in, for example, the title or as author.

So the ability to construct a smart group where one or more criteria can be included would be excellent.

Gerben
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

For the time being, why not set the smart group to find the name in any field? It may find some refs you don't want, but usually that's not a problem as long as it finds the refs you do want.

Jon
Sonny Software
Gerben
Posts: 193
Joined: Mon Aug 22, 2005 4:53 pm
Location: Florence, Italy
Contact:

Post by Gerben »

Yes that is a good option to check the references themselves. But I still have to create two smart groups, one for the Spotlight search and the other for the refs themselves.

Gerben
thecritic
Posts: 156
Joined: Tue Aug 09, 2005 2:10 pm

Post by thecritic »

Thanks for your detailed responses, Jon.
Jon wrote: 1. The Live Search uses relies on indexes to make it fast and, well, live. It would become a slow (if not glacial) search if Bookends did an unindexed search after every letter was typed. I think the convenience of a responsive live search outweighs the other considerations. I could add another option to the search popup menu (magnifying glass) to do a character search, but I'm not sure that's a good choice, either.
Can this be approached another way? Can the indices recognize the apostrophe as a delimiter, or is this a limitation of the underlying database engine?
Jon wrote: 3. There are examples of SQL searches for refs with/without attachments in the User Guide.
I see the power of SQL, but I wish that features like this were implemented in a GUI.
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

The indexes are determined by the way the underlying unicode library on Mac OS X works. You wouldn't want the apostrophe to be included, in any case, because then if you used an apostrophe as a quote mark (as many do) the word in 'quotes' wouldn't be found. But in any case, it's not mutable.

In any case, type Command-F, set to character search, type l'homme, press Return and you have the references you want.

Jon
Sonny Software
thecritic
Posts: 156
Joined: Tue Aug 09, 2005 2:10 pm

Post by thecritic »

Jon wrote:The indexes are determined by the way the underlying unicode library on Mac OS X works. You wouldn't want the apostrophe to be included, in any case, because then if you used an apostrophe as a quote mark (as many do) the word in 'quotes' wouldn't be found. But in any case, it's not mutable.

In any case, type Command-F, set to character search, type l'homme, press Return and you have the references you want.
Just to be clear: what I wanted was to type "homme" and have live search find that string regardless of whether the actual expression is "l'homme", "d'homme", etc.
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Sorry, I missed that.

I checked -- it seems the ICU library that Mac OS X uses for indexing is pretty clever, and is treating the l' as the beginning of a word (it's clever about a lot of things, like distinguishing between a period at the end of a sentence and one that represents a decimal place for a number).

The end result, though, is that the index has the word begin with "l", not "h".

Jon
Sonny Software
thecritic
Posts: 156
Joined: Tue Aug 09, 2005 2:10 pm

Post by thecritic »

Jon wrote: I checked -- it seems the ICU library that Mac OS X uses for indexing is pretty clever, and is treating the l' as the beginning of a word (it's clever about a lot of things, like distinguishing between a period at the end of a sentence and one that represents a decimal place for a number).

The end result, though, is that the index has the word begin with "l", not "h".
Make me wonder whether the ICU library would be even "smarter" if I changed the OS X system language to French -- not very convenient, though :(
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

I don't know, that's an interesting question. You'd probably have to reindex your database, if it were to work at all. If you do try this exercise, please let us know if it made a difference.

Jon
Sonny Software
Post Reply