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

通过getLastCount获取数据存在误差 #133

Open
fonhen opened this issue May 11, 2022 · 1 comment
Open

通过getLastCount获取数据存在误差 #133

fonhen opened this issue May 11, 2022 · 1 comment

Comments

@fonhen
Copy link

fonhen commented May 11, 2022

通过getLastCount获取数据存在误差

通过setLimit设置翻页后,存在前几页数据与后几页数据获取到的总文档量不一致。

@yzp531
Copy link

yzp531 commented May 10, 2024

通过这么分页数据数,搜索一次来绕道解决,不然涉及分页就会有问题
// $count = $search->getLastCount(); //分页时不可用,不准
$page=10;
$search->setQuery($my_query)->setLimit($page,100000*$page)->search();
$count=$search->count();

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