欢迎各位兄弟 发布技术文章
这里的技术是共享的
1)如下图 ,启用如下的模块,并进行配置
2)重要的配置如下
/admin/config/search/settings
/admin/config/search/file_attachments (这个似乎不必配置)
到 https://tika.apache.org/download.html 里去下载 jar文件 (tika-app-1.27.jar)
/admin/config/search/apachesolr
/admin/config/search/apachesolr/attachments
到 https://tika.apache.org/download.html 里去下载 jar文件
/admin/config/search/apachesolr/settings/solr/edit
下图只是配置 apachesolr搜索,与附件搜索功能无关
/admin/config/search/apachesolr/settings
下面是对 search api attachments 的配置,似乎没有必要进行配置 见 /node-admin/17065
Visit the Search API Attachments configuration page (admin/config/search/search_api/attachments) and set the following options:
Extraction method: Solr (remote server)
Solr extracting servlet path: extract/tika
Create a new file search index (click 'Add index' on the admin/config/search/search_api page, and choose 'File' for 'Item type').
After the index is created, add a couple fields (like 'File name') to the 'Fields to index', and save the changes.
For the file search index's filters configuration, make sure 'File attachments' is checked under 'Data Alterations', then save the changes.
Go back to the index's 'Fields' tab, and you should now see a 'File content' (attachments_content) field in the list, set to be indexed. This means the file attachments will be indexed correctly for this file search index.
来自 https://hostedapachesolr.com/support/tika-attachments