https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28610

            Bug ID: 28610
           Summary: Elasticsearch 7 - hits.total is now an object
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Searching - Elasticsearch
          Assignee: [email protected]
          Reporter: [email protected]

In Elasticsearch 7 hits.total is now an object
(https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#hits-total-now-object-search-response).

The total is now in $result->{hits}->{total}->{value} instead of
$result->{hits}->{total}.

There is also $result->{hits}->{total}->{relation} which specifies if the value
is exact or if it's a lower bound. So it's possible to say "Your search
returned > 10000 results."

You can always get an exact total by adding a track_total_hits parameter set to
true when using the Elasticsearch search method
(https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#track-total-hits-10000-default).

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to