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

getLastCount20条数据都误差在3条 #128

Open
ken678 opened this issue Jan 26, 2022 · 3 comments
Open

getLastCount20条数据都误差在3条 #128

ken678 opened this issue Jan 26, 2022 · 3 comments

Comments

@ken678
Copy link

ken678 commented Jan 26, 2022

[root@instance-eegfzl7f php]# util/Quest.php cms --query="公司 AND modelid:3" --limit 0,5 在 20 条数据中,大约有 6 条包含 公司 AND modelid:3 ,第 1-5 条,用时:0.0022 秒。

[root@instance-eegfzl7f php]# util/Quest.php cms --query="公司 AND modelid:3" --limit 0,10 在 20 条数据中,大约有 9 条包含 公司 AND modelid:3 ,第 1-9 条,用时:0.0026 秒。

@fonhen
Copy link

fonhen commented May 11, 2022

这个问题一直到现在还存在

@ken678
Copy link
Author

ken678 commented May 13, 2022

几百条几千条以上有误差还过得去,几条都有这么大误差

@hightman
Copy link
Owner

这是 xapian 的机制所致,如果只是为了得到精确的计数,可以通过 setLimit() 并传入一个较大的 offset

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

3 participants