欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal7 d7 实现 对附件文件 txt pdf excel 等 attachment 搜索 search apache solr apachesolr 功能的实现 自己亲自做的 有大用 有大大用 有大大大用

1)如下图 ,启用如下的模块,并进行配置

image.png

image.png

image.png


image.png

image.png



2)重要的配置如下 

/admin/config/search/settings

image.png



 /admin/config/search/file_attachments (这个似乎不必配置)


到 https://tika.apache.org/download.html 里去下载 jar文件 (tika-app-1.27.jar)

image.png

/admin/config/search/apachesolr

image.png


/admin/config/search/apachesolr/attachments

到 https://tika.apache.org/download.html 里去下载 jar文件

image.png


/admin/config/search/apachesolr/settings/solr/edit  

下图只是配置 apachesolr搜索,与附件搜索功能无关

image.png

/admin/config/search/apachesolr/settings

image.png



下面是对 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



普通分类: