Skip to content

Update index too slow #37

@boh5

Description

@boh5

I use whoosh backend with jieba analyzer. And use sqlalchemy link to mysql.
I use flask-apscheduler to perform update whoosh index tasks regularly. Code like blow:

@scheduler.task('cron', id='do_refresh_whoosh_index', hour=2)
def refresh_whoosh_index():
    app = scheduler.app
    with app.app_context():
        search.update_index()

The first time to update index is very quick( no index file yet), thousands rows per second. But when update_index run again, it will be very slow, about just 10 rows per second. I have to delete the index, and recreate.
Is there another solution? Or I made some mistake?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions