Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 python 进行文档搜索。Solr 是不行的,因为 Java 托管是一个限制。
所以嗖嗖似乎是显而易见的选择。但它似乎不能原生索引 doc 或 pdf 文件(就像 Solr 一样)。让它直接索引这些文件的方法是什么?
Whoosh 只需要从这些文档中提取的文本。虽然 Whoosh 库不会为您提取文本,但有一些 Python 库可以为您提取文本,例如 pdf miner、catdoc 或 antiword。
有关更多信息,请参阅这两个讨论: