用于搜索帖子附件的 WordPress 插件(通常是 doc 或 Pdf 等文本文件)

发布于 2024-09-04 22:35:49 字数 1539 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

谁许谁一生繁华 2024-09-11 22:35:50

我找到了一种解决方案。也许它也适合你:

Masala插件:https://github.com/nanodust/masala ,它实际上在上传任何 doc/pdf/ppt/txt 文件时添加新的帖子元字段。它将把文件内容放入新创建的元字段

该插件使用:
1)Java
2) Apache Tika – 真的很棒
3)Search Everything插件,负责元表中的搜索。

在这里,您需要配置:
1)Java路径
2)下载最新的apache tika jar,您可以放入项目根文件夹并在masala.php中配置路径
4) 给出允许的文件扩展名。

完成了!

I have found one solution. Maybe it will work for you also :

Masala Plugin : https://github.com/nanodust/masala , which actually add new post meta field while uploading any doc/pdf/ppt/txt file. It will put the file content into newly created meta field

This plugin uses :
1) Java
2) Apache Tika – really awesome
3) Search Everything plugin which is responsible for search in meta table.

Here, you need to configure :
1) Java path
2) Download latest apache tika jar and you can put into your project root folder and configure path in masala.php
4) Give the allowed file extensions.

ITS DONE !!

还给你自由 2024-09-11 22:35:49

WordPress 支持论坛中的此主题解决了此问题,并建议Google 自定义搜索,理论上应该搜索 PDF 和 DOC,并且易于设置和尝试,或者 搜索所有内容插件,这可能是杰夫在上面的评论中所说的不起作用的内容。

还有 Sphider Wordpress 插件,一个声称支持索引 PDF 和 DOC 文件的搜索插件。设置可能更困难,但这是我能找到的最佳选择。

This topic in the WordPress support forums addresses this question, and suggests Google custom search, which should in theory search PDFs and DOCs and would be easy to set up and try, or the Search Everything plugin, which might be what Jeff said doesn't work in his comment above.

There's also the Sphider Wordpress plugin, an search plugin that claims to support indexing PDF and DOC files. It might be more difficult to set up, but it's the best option I can find.

忆悲凉 2024-09-11 22:35:49

我有同样的需求(索引上传文件的内容),并且很惊讶没有插件允许这样做。上面的方法不起作用,搜索也没有任何结果。

所以——我写了一篇。

它有效,我们在工作中使用它。它不是超级友好 - 需要一点专业知识来确保 java &依赖项(apache tika)正在工作 - 但它确实有效。

我可能会更新它&提交到 WordPress 插件 - 但同时,如果它对任何人有帮助:

http://avatari.net/public/wordpress /马萨拉/

I had this same need (indexing contents of uploaded files) and was amazed there was no plugin that allows this. The above do not work, and searching gave nothing.

So - I wrote one.

It works, we're using it at work. It's not super friendly - takes a little bit of expertise to ensure java & dependency (apache tika) are working - but it does the trick.

I may update it & submit to wordpress plugins - but meanwhile, if it helps anyone:

http://avatari.net/public/wordpress/masala/

听不够的曲调 2024-09-11 22:35:49

问题:需要使用 WordPress 搜索来查找上传的 pdf 文件中的文本。

解决方案:

步骤 1. 上传 pdf

步骤 2. 在每个 pdf 的说明下粘贴以下内容:

单击上面的链接查看 PDF

步骤 3. 复制 pdf 中的文本并将其粘贴到上面的 PDFDOCUMENTTEXT 位置

步骤 4. 安装 Search Everything 插件并激活。
您的搜索现在应该返回结果,包括附件页面列表,其中包含 pdf 中的文本,但会引导用户单击 pdf 链接。

如果其他人知道更好的方法,请告诉我。

Problem: Need to use wordpress search to find text within uploaded pdf files.

Solution:

Step 1. Upload your pdf(s)

Step 2. Under the description of each pdf paste the following:

Click the link above to view PDF

Step 3. Copy the text from the pdf and paste it in the above in place of PDFDOCUMENTTEXT

Step 4. Install Search Everything plugin and then activate.
Your searches should now return results including a list of attachment pages that include the text within the pdfs but will direct the user to click on the pdf link.

If anyone else knows of a better way to do this please let me know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文