gpt4 book ai didi

xml - 在 Apache Solr 中索引 XML 文件

转载 作者:行者123 更新时间:2023-12-04 04:45:31 25 4
gpt4 key购买 nike

我对 Solr 很陌生。在提出这个问题之前,我已经看过帖子( Need help indexing XML files into Solr using DataImportHandler )。但是它没有帮助,因为我对 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>

是否必须使用 DIH 将此数据导入 Solr?没有更简单的方法来完成任务吗?是否可以通过 SolrJ 完成,因为我也可以通过控制台输出结果。除了官方文档之外,如果有人可以向我指出一些有用的示例或资源,那将非常有帮助。

最佳答案

以下是使用 Solrj 解析并索引 XML 文件的 groovy 示例:

  • parse Solr xml files to SolrInputDocument
  • Need help indexing XML files into Solr using DataImportHandler
  • 关于xml - 在 Apache Solr 中索引 XML 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18243402/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com