'Given the contents of a cell, compute a search string that will find
that book and any others with identical contents in the cell.'

def books_table_set_search_string(self, current_row, current_col):

    current = self.books_table.item(current_row, current_col)
    if (current is None):
        return
    book_id = current.data(Qt.UserRole)
    if (current is None):
        return
    col = self.column_order[current.column()]
    if (col == 'title'):
        self.set_search_text((('title:="' + current.text().replace('"', '\\"')) + '"'))
    elif (col == 'authors'):
        authors = []
        for aut in [t.strip() for t in current.text().split('&')]:
            authors.append((('authors:="' + aut.replace('"', '\\"')) + '"'))
        self.set_search_text('    and    '.join(authors))
    elif (self.fm[col]['datatype'] == 'series'):
        mi = self.db.get_metadata(book_id, index_is_id=True, get_user_categories=False)
        t = mi.get(col)
        if t:
            self.set_search_text((((col + ':="') + t) + '"'))
        else:
            self.set_search_text(None)
    elif self.fm[col]['is_multiple']:
        items = [(((col + ':"=') + v.strip()) + '"') for v in current.text().split(self.fm[col]['is_multiple']['ui_to_list'])]
        self.set_search_text('    and    '.join(items))
    else:
        self.set_search_text((((col + ':"=') + current.text()) + '"'))
