SOLR 3.4 を使用してリッチ テキスト ドキュメントのインデックスを作成していますが、希望どおりExtractingRequestHandler
に動作させるのに問題があります。
後でファセット検索に使用するフィールドとして作成日を保存したいと考えており、 で次のように定義していますschema.xml
。
<field name="creation_date" type="date" indexed="true" stored="true"/>
私はこのように索引付けします:
curl -s "http://localhost:8983/solr/update/extract?literal.id=myid&resource.name=myfile.xls&commit=true" -F myfile=@/path/to/myfile.xls
動的フィールドを取得しますattr_creation_date
(他のルールが確認します) が、creation_date
. 私もcopyField
次のように使用しようとして失敗しました:
<copyField source="attr_creation_date" dest="creation_date"/>
さらに別の試みはこれを に入れていましsolrconfig.xml
たが、うまくいきませんでした:
<str name="fmap.Creation-Date">creation_date</str>
ここで基本的な何かが欠けていると確信しています。どんな助けでも大歓迎です!
ExtractingRequestHandler
の設定solrconfig.xml
:
<requestHandler name="/update/extract" startup="lazy"
class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<str name="fmap.content">text</str>
<str name="fmap.Last-Save-Date">last_save_date</str>
<str name="fmap.Creation-Date">creation_date</str>
<str name="fmap.Content-Type">content_type</str>
<str name="lowernames">true</str>
<str name="uprefix">attr_</str>
<str name="captureAttr">true</str>
<str name="fmap.a">links</str>
</lst>
</requestHandler>
私のschema.xml
ファイル (多くのデフォルトのもの): https://gist.github.com/1358002