博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
es插件使用之ltr插件demo体验
阅读量:4045 次
发布时间:2019-05-24

本文共 1022 字,大约阅读时间需要 3 分钟。

安装完ltr插件重启后,开始使用ltr插件

根据要求

1,windows安装python3.x,配置环境变量

2,下载擦插件源码,idea打开demo目录,导入所缺包,配置python的sdk,待所有py文件都导入依赖包后

3,执行python prepare.py,下载RankLib.jar (used to train model) and tmdb.json 到本地。

4,执行index_ml_tmdb.py,生成'tmdb' index with default/simple mappings.

注意,该过程遇到报错,原因es堆内存(ES_HEAP_SIZE)设置128m太小,改成2g后正常。

5,开始训练模型。

python train.py

6,根据模型查询,Then you can search using

python search.py Rambo

 通过idea查询时,手动写死了参数

{"query": {"multi_match": {"query": "Rambo", "fields": ["title", "overview"]}}, "rescore": {"query": {"rescore_query": {"sltr": {"params": {"keywords": "Rambo"}, "model": "test_6"}}}}}E:\code\elasticsearch-learning-to-rank-es_7_6_2\elasticsearch-learning-to-rank-es_7_6_2\demo\venv\lib\site-packages\elasticsearch\connection\base.py:177: ElasticsearchDeprecationWarning: [types removal] Specifying types in search requests is deprecated.  warnings.warn(message, category=ElasticsearchDeprecationWarning)RamboRambo IIIRambo: First Blood Part IIFirst BloodIn the Line of Duty: The F.B.I. MurdersSon of RambowSpud

 

 未完待续

转载地址:http://evwci.baihongyu.com/

你可能感兴趣的文章
qt5 everywhere 编译summary
查看>>
qt5 everywhere编译完成后,找不到qmake
查看>>
qt 创建异形窗体
查看>>
可重入函数与不可重入函数
查看>>
简单Linux C线程池
查看>>
内存池
查看>>
输入设备节点自动生成
查看>>
GNU hello代码分析
查看>>
Qt继电器控制板代码
查看>>
wpa_supplicant控制脚本
查看>>
gstreamer相关工具集合
查看>>
RS232 四入四出模块控制代码
查看>>
gstreamer插件之 videotestsrc
查看>>
linux 驱动开发 头文件
查看>>
/etc/resolv.conf
查看>>
container_of()传入结构体中的成员,返回该结构体的首地址
查看>>
linux sfdisk partition
查看>>
ipconfig,ifconfig,iwconfig
查看>>
opensuse12.2 PL2303 minicom
查看>>
网络视频服务器移植
查看>>