Page 1 of 1

Searching in BOT?

Posted: Mon Jan 23, 2012 9:38 am
by doconnor
Hi there,

I recently purchased Bookends on Tap. First off, congrats on making a program that sync's so robustly. Getting my library synchronized with my iPad was a breeze. Two small issues, though, that I'm hoping you can help me solve:

1) After transferring my library with 4,500 attachments, I was unable to search the references in BOT. The keyboard comes up, the progress indicator comes on, but it hangs BOT. It does not seem to matter whether I am searching 'all', 'authors', etc.

2) I don't necessarily need to bring all 4,500 attachments with me everywhere that I go, but I could not figure out how to use relative dates to create a smart group. For example, I would like to have a smart group that takes 100 references, selected by most recent date added. Is there a way to do this with smart groups? It seems like it would be trivial to do with SQL smart groups (e.g., SELECT * FROM REFERENCES ORDER BY date_added DESC LIMIT 100), but I cannot figure out how the date added is stored in the database table. Can you clarify?

Thanks,

dave

Re: Searching in BOT?

Posted: Mon Jan 23, 2012 12:16 pm
by Jon
For point 1, searches are slow on iOS devices, and so the live search feature can be very sluggish with lots of references. The next update (1.0.3, already submitted to the App Store and awaiting review) lets you disable live search if you start the search words with a space. I think this will be a big help.

The user guide has the SQL syntax for searching by creation or modification date (p. 296).

--------------------
Search for references that were edited within the last 2 weeks

For US systems:

dateModified > datediff( now(), '01/01/1904 00:00:00', 'second' ) - (14 * 24 * 60 * 60)

For European systems:

dateModified > datediff( now(), '01-01-1904 00:00:00', 'second' ) - (14 * 24 * 60 * 60)


Change 14 to the number of days you want as the interval since last edited.
--------------------


Search for references that were added in the 2 last weeks

For US systems:

dateAdded > datediff( now(), '01/01/1904 00:00:00', 'second' ) - (14 * 24 * 60 * 60)

For European systems:

dateAdded > datediff( now(), '01-01-1904 00:00:00', 'second' ) - (14 * 24 * 60 * 60)

--------------------

Search for references that do or do not have attachments


To find references with attachments:

varCharField REGEX '[a-z]'

To find references without attachments:

NOT varCharField REGEX '[a-z]'
--------------------


Jon
Sonny Software