我是solr的新手。我希望在分析阶段将同义词或停止词从DB加载到solr,而不是txt文件。我怎么才能在solr 6里拿到它呢?
我尝试了移植Solr-JDBC(https://github.com/shopping24/solr-jdbc),并将web.xml配置为下面的代码:
<resource-ref>
<description>my datasource</description>
<res-ref-name>jdbc/dsTest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>以及solr-jetty-context.xml与:
<New id="dsTest" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>jdbc/dsTest</Arg>
<Arg>
<New class="org.postgresql.ds.PGSimpleDataSource">
<Set name="User">username</Set>
<Set name="Password">password</Set>
<Set name="DatabaseName">DBName</Set>
<Set name="ServerName">localhost</Set>
<Set name="PortNumber">5432</Set>
</New>
</Arg>
</New>但是,当我试图启动SolrCloud时,我遇到了以下错误。
错误:没有看到solr在http://localhost:8983/solr 30内上线
另外,所需的库也会添加到正确的文件夹中。
发布于 2017-05-02 10:00:14
老实说,我认为这个解决方案很混乱,我强烈建议将同义词和停止词导出到文本文件中,并保存它们覆盖旧的配置文件。
在此之后,您可能已经知道,您必须重新加载核心/集合配置,并根据分析器链重新索引所涉及的所有文档。
另一方面,如果你真的想这样做,看看你的问题,我可以给你以下建议,你必须反复检查:
发布于 2017-05-04 12:04:27
是的,它是固定的,我下载了jetty-jndi.jar,但是忘记将它添加到lib文件夹中。
https://stackoverflow.com/questions/43724758
复制相似问题