java - Solr/Lucene : Is it possible to overload a method in a Custom Similarity Class?

标签 java solr lucene

是否有一些文件可以更改传递给相似性类的参数,以确定将使用哪个版本的重载方法?

我在在线文档中找不到答案。

最佳答案

模式文件末尾的相似性部分,您可以在其中指定自定义相似性或使用与 Solr 捆绑的相似性之外的其他相似性。

这是默认 schema.xml 下的内容 -

  <!-- Similarity is the scoring routine for each document vs. a query.
   A custom Similarity or SimilarityFactory may be specified here, but 
   the default is fine for most applications.  
   For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
-->
  <!--
     <similarity class="com.example.solr.CustomSimilarityFactory">
       <str name="paramkey">param value</str>
     </similarity>
    -->

关于java - Solr/Lucene : Is it possible to overload a method in a Custom Similarity Class?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25436340/

相关文章:

java - 如何在lucene中索引日期字段

java - Spring Data JPA 删除不是我所期望的

java - Eclipse 大纲 View - 如何隐藏不推荐使用的方法

postgresql - 将停用词从 Postgresql 加载到 Solr6

SolrNet:如果当前使用的服务器出现故障,如何将 Solr 连接切换到另一台服务器?

java - KeywordAnalyzer 用于处理带有变音符号的单词的不同拼写

c# - 如何对多个(复杂结构)字段进行 RavenDB 查询并返回匹配的值?

java nio - Paths.get() 如何查找项目根目录中的文件夹?

java - 我应该在哪里声明和/或实现我的自定义 ResultCommand?

包含某些特定单词的 Solr Negative Boost 查询结果