KETSE / casebox

Casebox: Secure all your information and team communication in one place
https://www.casebox.org
217 stars 117 forks source link

Items created after 50 records are put on page 2 no matter the sorting criteria #15

Closed RafaPolit closed 9 years ago

RafaPolit commented 9 years ago

General description

If I have 50 items created inside a Template with a sorting criteria like 'order', the newly created items are pushed to page 2 even if their sorting order would put them on page 1, which seems confusing as you would expect the new item in its 'correct' location.

Way to reproduce

Best regards, Rafa.

oburlaca commented 9 years ago

@RafaPolit, we've discussed this issue over skype: Casebox sorts a column in two ways:

  1. Columns indexed in SOLR: Casebox asks SOLR to sort search result
  2. if the column is not indexed in SOLR, then sorting is done in PHP after search results are fetched from SOLR

The problem with point n2: pagination & sorting doesn't work ok, because we first retrieve 50 records that are sorted by solr (by ID for ex), and only then PHP sorting happens

oburlaca commented 9 years ago

The solution is to index columns that requires correct sorting in SOLR. closing issue

RafaPolit commented 9 years ago

Something is not working as expected with this issue.

Still no luck. Here is the current conifguration: Image of Configuration

And here is the resulting page 1 and 2 of sorting by reverse order: Image of Page 1 Image of Page 2