![](/img/trans.png)
[英]Indexing PDF - Faceted Search with Apache Solr and Apache Tika
[英]Apache Solr PDF indexing
每當應用程序上傳pdf
文件時,我都希望為其編制索引。 在編制索引時,我在url
發送filename
和filename
fileType
,如下所示
http://localhost:8983/solr/update/extract?stream.file=/D:\apache-solr-3.3.0\example\exampledocs\Accessing_MySQL_from_IntalioBPMS.pdf&stream.contentType=application/pdf&literal.id=111&literal.fileName=Test.pdf&literal.fileType=pdf&commit=true
我的schema.xml
文件中也有字段fileName
和fileType
。
我索引PDF文檔后,我做它顯示了搜索只是content
和id
的的pdf
文檔,但沒有filename
和filetype
。
我做錯了什么?
定義架構時,必須指定要存儲的字段(或在搜索時可檢索的字段)。 在這種情況下,您的文件名和文件類型字段可能僅被索引而不被存儲。
確保您的架構如下所示:
<field name="filename" type="{yourDesiredType}" indexed="true"
stored="true"
/>
<field name="filetype" type="{yourDesiredType}" indexed="true"
stored="true"
/>
有關編輯schema.xml
更多信息,請訪問http://wiki.apache.org/solr/SchemaXml 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.