Whoosh index viewer

后端 未结 2 481
梦如初夏
梦如初夏 2021-02-02 00:16

I\'m using haystack with whoosh as backend for a Django app.

Is there any way to view the content (in a easy to read format) of the indexes generated by whoosh? I\'d lik

2条回答
  •  执念已碎
    2021-02-02 00:37

    from whoosh.index import open_dir
    ix = open_dir('whoosh_index')
    ix.searcher().documents()  # will show all documents in the index.
    

提交回复
热议问题