Closed zhangwei911 closed 5 months ago
检查一下索引是否构建成功,我猜测是库里面没有数据,所以没匹配到
怎么判断呢,es能查到数据啊
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年04月10日 18:06 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [PaddlePaddle/PaddleNLP] [Question]: 运行的FAQ,es中可以找到索引,但是通过api查询的时候没有匹配到答案 (Issue #8247) |
检查一下索引是否构建成功,我猜测是库里面没有数据,所以没匹配到
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
类似于这样:https://github.com/PaddlePaddle/PaddleNLP/tree/develop/pipelines/examples/semantic-search
# 打印几条数据
curl http://localhost:9200/dureader_robust_query_encoder/_search
我说的可以查询到数据就是用的这个api
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年04月11日 09:20 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [PaddlePaddle/PaddleNLP] [Question]: 运行的FAQ,es中可以找到索引,但是通过api查询的时候没有匹配到答案 (Issue #8247) |
类似于这样:https://github.com/PaddlePaddle/PaddleNLP/tree/develop/pipelines/examples/semantic-search
curl http://localhost:9200/dureader_robust_query_encoder/_search
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
那再检查一下索引名是不是一样,我怀疑你搜了一个不存在的索引
不是这个问题,但我发现一个奇怪的现象,就是我用vscode调试模式执行utils/offline_ann.py之后就可以查到数据,但是直接命令行执行python utils/offline_ann.py --index_name insurance --doc_dir data/insurance --split_answers --delete_index就不行,从日志来看,调试的时候updating embbings for all 111 docs,是有数量的,但是命令行确是0
我在调用update_embeddings方法前加了一个time.sleep(3)等待3秒就可以了,这个是什么原因呢
可能有这个问题,索引还没建完就开始插入数据。
请提出你的问题
运行的FAQ,es中可以找到索引,但是通过api查询的时候没有匹配到答案