question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Grouping documents breaks pagination & more

See original GitHub issue

The grouping features seems to break pagination, total results, and results per page when using the Reference UI or Search UI.

To reproduce, download the Reference UI/Search UI and apply a grouping rule to one of the fields: "group": { "field": "doc_group" }

The total results, and results per page sections represent the amount results had they not been grouped together, I think this is a little misleading as the amount of visible documents would be considerably less.

The pagination has the same issue. Due to the app thinking there are more results to be shown, it calculates more pages than you need, then some of the pages show blank as there actually aren’t that many results.


Digging further, I have noticed that when using the grouping feature it won’t return any more than 100 results, as opposed to the 1000 allowed when not using the grouping feature.

When making a search I am receiving “172” as the totalResults value, however I can only view 100 of them. If I set the results to 200 per page, the totalResults comes through as 172, but the amount of actual results being returned by the API is still 100.

Changing the size field on the group doesn’t seem to affect this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
JasonStoltzcommented, Oct 23, 2019

@XigeTime Hey! Glad you got it working.

Curations will not currently work with grouping. I will ask around about a workaround.

Is there somewhere I can open issues with App Search? Or follow the updates?

If you go through support and file a bug or Enhancement Request with them, they will create a request with a tracking number which you will be able to follow. I would not expect a very fast turnaround for this particular issue though.

1reaction
JasonStoltzcommented, Oct 21, 2019

Hey @XigeTime,

This is actually a known issue in App Search. Unfortunately, with the current “group” implementation, paging and sorting are both known to break or behave unexpectedly.

I do have a temporary solution for you. Add “collapse: true” in your group configuration:

"group": { "field": "doc_group", "collapse": true }

This should fix the issue you are experiencing with paging and sorting.

** There is one caveat to this ** - If the doc_group field you are grouping on can have multiple values, the field collapsing will not work correctly. You must ensure that documents have one single values for doc_group.

Let me know if this helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Grouping documents breaks pagination & more #46 - GitHub
The grouping features seems to break pagination, total results, and results per page when using the Reference UI or Search UI.
Read more >
Control pagination - Microsoft Support
In Word 2011 for Mac, on the Document Elements tab, under Insert Pages, click Break, and then click Page. Document Elements tab, Insert...
Read more >
Managing pagination (or, avoiding page breaks where you ...
Managing pagination (or, avoiding page breaks where you don't want them). The worst way to manage pagination is to do Insert > Page...
Read more >
How to set page breaks on a grouping level in Report Studio
In the Data Items pane, drag the data item you want to group by to the Groups folder in the Groups pane. Click...
Read more >
Paginate By Group- FineReport Help Document
In pagination preview mode, FineReport will split the data beyond the page size to the next page, but this will cause the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found