2

私はSolrを初めて使用します。この質問をする前に、投稿 ( DataImportHandler を使用して XML ファイルを Solr にインデックス化するのに助けが必要) を読みました。しかし、私は Apache Solr に非常に慣れていないため、役に立ちませんでした。xml ファイルのインデックスを作成し、その内容を検索しようとしています。その構造はこのようなものに似ています

<entry id="REACT_142474" acc="REACT_142474.5">
<name>((1,6)-alpha-glucosyl)poly((1,4)-alpha-glucosyl)glycogenin =&gt; poly{(1,4)-alpha-      glucosyl} glycogenin + alpha-D-glucose</name>
<description>This event has been computationally inferred from an event that has been demonstrated in another species.The inference is based on the homology mapping in Ensembl Compara. Briefly, reactions for which all involved PhysicalEntities (in input, output and catalyst) have a mapped orthologue/paralogue (for complexes at least 75% of components must have a mapping) are inferred to the other species. High level events are also inferred for these events to allow for easier navigation.More details and caveats of the event inference in Reactome. For details on the Ensembl Compara system see also: Gene orthology/paralogy prediction method.</description>
<dates>
<date type="creation" value="06-JUN-2013"/>
<date type="last_modification" value="06-JUN-2013"/>
</dates>
<cross_references>
<ref dbname="ChEBI" dbkey="17925"/>
<ref dbname="UniProt" dbkey="Q06625"/>
<ref dbname="ChEBI" dbkey="18291"/>
<ref dbname="UniProt" dbkey="P47011"/>
<ref dbname="UniProt" dbkey="P36143"/>
<ref dbname="GO" dbkey="GO:0004135"/>
<ref dbname="taxonomy" dbkey="4932"/>
</cross_references>
<additional_fields>
<field name="organism">Saccharomyces cerevisiae</field>
</additional_fields>
</entry>

このデータを Solr にインポートするには、DIH を使用する必要がありますか? タスクを達成するためのより簡単な方法はありませんか? コンソールを介して結果を出力しても問題ないので、SolrJを介して実行できますか。誰かが公式ドキュメントとは別に、これに関するいくつかの有用な例やリソースを教えてくれると本当に助かります.

4

2 に答える 2

4

以下は、Solrj を使用して XML ファイルを解析してからインデックスを作成するグルーヴィーな例です。

于 2013-08-14T23:56:13.100 に答える