Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

The default addition of "aggs": {} causes scroll pagination invalid

Open
#23 1 comment 0 reactions 1 assignee View on GitHub

@Nick-S-2018 is already working on this.

Since Aug 25, 2025.

Assessment

This issue has not been assessed yet.

Description

sdk version: 8.1.0

    /**
     * search
     */
    public SearchResponse search(String tableName, String queryString, List<Object> sort, String scrollToken,
                                 Integer size) {
        ApiClient client = this.newClient();

        SearchQuery searchQuery = new SearchQuery();
        searchQuery.setQueryString(queryString);

        SearchRequest searchRequest = new SearchRequest();
        searchRequest.table(tableName).query(searchQuery);
        searchRequest.sort(sort);
        searchRequest.limit(size);

        // scroll pagination
        Map<String, Object> options = new HashMap<>();
        if (StrUtil.isNotBlank(scrollToken)) {
            options.put("scroll", scrollToken);
        } else {
            options.put("scroll", true);
        }
        searchRequest.options(options);

        SearchApi searchApi = new SearchApi(client);

        try {
            SearchResponse response = searchApi.search(searchRequest);
            log.debug("Search response: {}", response);
            return response;
        } catch (ApiException e) {
            this.printError(e);
            throw new RuntimeException(e);
        }
    }

final json body:

{
    "table": "products",
    "query": {
        "query_string": "黑色"
    },
    "join": [],
    "limit": 10,
    "aggs": {},
    "expressions": {},
    "options": {
        "scroll": "eyJvcmRlcl9ieV9zdHIiOiJzYWxlcyBhc2MsIGlkIGFzYyIsIm9yZGVyX2J5IjpbeyJhdHRyIjoic2FsZXMiLCJkZXNjIjpmYWxzZSwidmFsdWUiOjAsInR5cGUiOiJpbnQifSx7ImF0dHIiOiJpZCIsImRlc2MiOmZhbHNlLCJ2YWx1ZSI6MjMwOTE4NDQwMzM3NDM0MjE1MywidHlwZSI6ImludCJ9XX0="
    },
    "sort": [
        {
            "sales": {
                "order": "asc"
            }
        },
        {
            "id": {
                "order": "asc"
            }
        }
    ]
}

There is an "aggs": {}, is auto-generated, it will cause scroll pagination invalid.
Did I use it incorrectly, or is this a feature or a bug ?

Dominant language
Java
Stars
65
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from manticoresoftware/manticoresearch-java

All issues in manticoresoftware/manticoresearch-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.