def rebuild_pgroonga_index(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
    with connection.cursor() as cursor:
        do_batch_update(
            cursor,
            "zerver_message",
            [SQL("search_pgroonga = escape_html(subject) || ' ' || rendered_content")],
            batch_size=10000,
        )
示例#2
0
def rebuild_pgroonga_index(apps: StateApps,
                           schema_editor: DatabaseSchemaEditor) -> None:
    with connection.cursor() as cursor:
        do_batch_update(cursor,
                        'zerver_message', ['search_pgroonga'],
                        ["escape_html(subject) || ' ' || rendered_content"],
                        escape=False,
                        batch_size=10000)
def rebuild_pgroonga_index(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
    with connection.cursor() as cursor:
        do_batch_update(cursor, 'zerver_message', ['search_pgroonga'],
                        ["escape_html(subject) || ' ' || rendered_content"],
                        escape=False, batch_size=10000)