0

I am planning to upload user's word documents in MongoDB using GridFS. I have to implement following functionality.

When admin type a string and hit search in administration app, i have to list all word documents where the contents contain the search string. I have to search across all user's documents.

Is there a way to achieve this in MongoDB? If not, what is the best way to achieve this?

4

1 回答 1

1

在 MongoDB 中,您可以做的最好的事情是将搜索短语与 GridFS 中的内容进行二进制匹配,但在 Word 文档中,您可能找不到该短语,因为它可能已被压缩。

我认为使用 Solr 等专用搜索解决方案会更好。Solr 甚至允许您从 Word 文档中提取文本,并允许您以非常完整的搜索语言搜索任何类型的短语。查看http://wiki.apache.org/solr/ExtractingRequestHandler处理 Word 文档

于 2013-07-31T12:47:56.653 回答