Skip to content

Calisphere collections with 10k+ items results in an error on page 417 of results onward: fix search #440

Description

@christinklez

Related to #441

Gabriela reharvested Jay Klein and it now has over 10,000 objects. However, Natalie noted (and Gabriela + Christine can replicate) that when you navigate to page 417 and on, we get an error:

https://calisphere-stage.cdlib.org/collections/26943/?q=&sort=a&start=9984

ValueError at /collections/26943/
Bad request: RequestError(400, 'search_phase_execution_exception', 'Result window is too large, from + size must be less than or equal to: [10000] but was [10008]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.')

{
  "query": {
    "terms": {
      "collection_url": [
        "26943"
      ]
    }
  },
  "aggs": {
    "type": {
      "terms": {
        "field": "type.raw",
        "size": 10000
      }
    },
    "facet_decade": {
      "terms": {
        "field": "facet_decade.raw",
        "size": 10000
      }
    },
    "relation.raw": {
      "terms": {
        "field": "relation.raw",
        "size": 10000
      }
    }
  },
  "sort": [
    {
      "sort_title": {
        "order": "asc"
      }
    }
  ],
  "size": 24,
  "from": 9984,
  "track_total_hits": true
}

Freshdesk: https://help.oac.cdlib.org/a/tickets/185861

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions