2011-09-09 44 views
0

我在solr-index maping.xml中添加了以下更改,並在solr scheama中添加了相關字段,但content_type沒有出現在xml結果中,請幫助我。如何在nutch中獲得文件擴展名?

費爾德我在Solr的索引maping.xml添加:

<fields> 
    <field dest="content" source="content"/>   
    <field dest="contentType" source="contentType"/>   
    </fields> 

費爾德我在Solr模式增加了:

<field name="contentType" type="string" indexed="true" stored="true" multiValued="true"/> 

回答

0

不要忘記要求在新增加的字段contentType您的查詢。 使用類似`q = text & fl = content,contentType'的查詢。

檢查http://wiki.apache.org/solr/CommonQueryParameters#fl

+0

我添加此查詢,但只有內容出現在XML響應和我的文檔的contentType是空的,我需要我的文檔的內容類型,才能在速度 – hadi

+0

過濾PDF文檔貴索引文檔有正確的'contentType'字段填充? 您可以使用http://wiki.apache.org/solr/LukeRequestHandler探索您的索引 – hkn

相關問題