Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] tairSearch.tftmadddoc 批量插入报错 #25

Closed
dashiell-zhang opened this issue Jul 13, 2023 · 2 comments
Closed

[bug] tairSearch.tftmadddoc 批量插入报错 #25

dashiell-zhang opened this issue Jul 13, 2023 · 2 comments

Comments

@dashiell-zhang
Copy link

image

tairSearch.tftadddoc 单个插入不会报错,但是批量插入会直接报错,userCaches 的值如下:

image

@ztxiuyuan
Copy link
Member

tft.madddoc 使用时必须指定每个 doc 的 docid (https://help.aliyun.com/document_detail/443821.html#section-jyu-b19-f35)
image

可以参考TairSearchTest测试文件中的tftmaddteststringcase.

@dashiell-zhang
Copy link
Author

dashiell-zhang commented Jul 13, 2023

下午好,我现在调整之后可以了,是因为我之前默认认为字典的 key 应该就是 doc_id,没想到 tftmadddoc 方法竟然是反过来的逻辑,key 是 doc,value 是 doc_id,当入参是 字典时,习惯性的会认为 key 应该是 标识id,tftmadddoc 这里的入参逻辑有点奇怪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants