Elasticsearch mapping文档相似性算法
Elasticsearch allows you to configure a scoring algorithm or similarity per field. The similaritysetting provides a simple way of choosing a similarity algorithm other than the default TF/IDF, such as BM25.
Similarities are mostly useful for text fields, but can also apply to other field types.
Custom similarities can be configured by tuning the parameters of the built-in similarities. For more details about this expert options, see the similarity module.
The only similarities which can be used out of the box, without any further configuration are:
BM25- The Okapi BM25 algorithm. The algorithm used by default in Elasticsearch and Lucene. See Pluggable Similarity Algorithms for more information.
classic- The TF/IDF algorithm which used to be the default in Elasticsearch and Lucene. See Lucene’s Practical Scoring Function for more information.
The similarity can be set on the field level when a field is first created, as follows:
PUT my_index
{
"mappings": {
"my_type": {
"properties": {
"default_field": {
"type": "text"
},
"classic_field": {
"type": "text",
"similarity": "classic"
}
}
}
}
}
|
|
The |
|
|
The |
参考:https://www.elastic.co/guide/en/elasticsearch/reference/current/similarity.html
Elasticsearch mapping文档相似性算法的更多相关文章
- elasticsearch 路由文档到分片
路由文档到分片 当你索引一个文档,它被存储在单独一个主分片上.Elasticsearch是如何知道文档属于哪个分片的呢?当你创建一个新文档,它是如何知道是应该存储在分片1还是分片2上的呢? 进程不能是 ...
- ElasticSearch——原始文档和倒排索引
一.原始文档 如上图所示, 第二象限是一份原始文档,有title和content2个字段,字段取值分别为”我是中国人”和” 热爱共X产党”,这一点没什么可解释的.我们把原始文档写入Elasticsea ...
- elasticsearch父子文档处理(join)
elasticsearch父子文档处理 join 一.背景 二.需求 三.前置知识 四.实现步骤 1.创建 mapping 2.添加父文档数据 3.添加子文档 4.查询文档 1.根据父文档id查询它下 ...
- 相似文档查找算法之 simHash 简介及其 java 实现 - leejun_2005的个人页面 - 开源中国社区
相似文档查找算法之 simHash 简介及其 java 实现 - leejun_2005的个人页面 - 开源中国社区 相似文档查找算法之 simHash 简介及其 java 实现
- ElasticSearch部署文档(Ubuntu 14.04)
ElasticSearch部署文档(Ubuntu 14.04) 参考链接 https://www.elastic.co/guide/en/elasticsearch/guide/current/hea ...
- 007-elasticsearch5.4.3【一】概述、Elasticsearch 访问方式、Elasticsearch 面向文档、常用概念
一.概述 Elasticsearch 是一个开源的搜索引擎,建立在一个全文搜索引擎库 Apache Lucene™ 基础之上. Elasticsearch 也是使用 Java 编写的,它的内部使用 L ...
- Elasticsearch 删除文档
章节 Elasticsearch 基本概念 Elasticsearch 安装 Elasticsearch 使用集群 Elasticsearch 健康检查 Elasticsearch 列出索引 Elas ...
- Elasticsearch 更新文档
章节 Elasticsearch 基本概念 Elasticsearch 安装 Elasticsearch 使用集群 Elasticsearch 健康检查 Elasticsearch 列出索引 Elas ...
- .Net Api 之如何使用Elasticsearch存储文档
.Net Api 之如何使用Elasticsearch存储文档 什么是Elasticsearch? Elasticsearch 是一个分布式.高扩展.高实时的搜索与数据分析引擎.它能很方便的使大量数据 ...
随机推荐
- 03_Nginx加入新模块
1 进入nginx安装文件夹,查看nginx版本号及其编译參数: [root@localhost nginx]# ./nginx -V nginx version: nginx/1.8.0 bu ...
- servlet实现文件下载所需步骤及说明
servlet实现文件下载所需步骤及说明 CreateTime--2017年9月1日15:46:22 Author:Marydon 参考链接:http://blog.sina.com.cn/s/b ...
- C语言-字符串
问题: 给出的区分大小写的字母字符的字符串,找到最大的字符串X,或者为X,或者其逆可以找到任何给定的字符串的子串 输入: 输入文件的第一行包含一个整数t(1 < = t < = 10),测 ...
- Android UI开发神兵利器之Icon
好的设计离不开Icon 话不多.介绍2个国外的站点,一个用来找Icon,一个用来搞页面设计 http://dryicons.com/free-icons/ http://www.webdesignsh ...
- 在EA中用ER图生成数据库
ER图 E-R图也称实体-联系图(Entity Relationship Diagram).提供了表示实体类型.属性和联系的方法.用来描写叙述现实世界的概念模型. 实体就是看的见摸得着或者能被人感知接 ...
- 用Putty连接Linux
随着linux应用的普及,linux管理越来越依赖远程管理.在各种telnet类工具中,putty是其中最出色的一个. 一.Putty简介 Putty是一个免费小巧的Win32平台下的teln ...
- 如何在DOS窗口中显示UTF-8字符
在中文Windows系统中,如果一个文本文件是UTF-8编码的,那么在CMD.exe命令行窗口(所谓的DOS窗口)中不能正确显示文件中的内容.在默认情况下,命令行窗口中使用的代码页是中文或者美国的,即 ...
- 【WPF学习笔记】之 System.Exception 对象名 'XXXX' 无效。
我在运行vs时候发现项目报错,如下图: 报Exception错误,对象名“XXXXXX”无效. 经过调查得知,因为连接数据库的库名写错了,如下: 对应正确数据库的库名: 把库名改正确,问题就解决了.
- android 自定义控件View在Activity中使用findByViewId得到结果为null
转载:http://blog.csdn.net/xiabing082/article/details/48781489 1. 大家常常自定义view,,然后在xml 中添加该view 组件..如果在 ...
- intellij idea使用技巧
1 小窗口脱离了主窗口的解决办法 只要将floating mode和windowed mode取消掉就可以了,当选择上了floating mode和windowed mode之后会打一个勾,再次点击勾 ...