Change the number of default results and enable scrolling

Hi All

I am trying to integrate DocSearch into our documentation website, everything looks good but i’m having few difficulties configuring it.

Even Though i added hitsPerPage in searchParametrs i’m not getting same number of results in the UI. The results are always 5.
Can someone please take a look at the JavaScript config and help me, i’m interested to see some more results and scrolling.


Here is my config.json used for scraping.

  "index_name": "developer_appliedolap_com",
  "start_urls": [
     "https://developer.appliedolap.com/"
  ],
  "sitemap_urls": [
    "https://developer.appliedolap.com/sitemap.xml"
  ],
  "scrape_start_urls": true,
  "stop_urls": [],
  "selectors": {
    "default": {
      "lvl0": {
        "global": true,
        "selector": ".nav-panel-explore .context .title, .nav-panel-explore .context .version"
      },
      "lvl1": ".doc > h1.page",
      "lvl2": ".doc .sect1 > h2:first-child, .doc > h1.sect0",
      "lvl3": ".doc .sect2 > h3:first-child",
      "lvl4": ".doc .sect3 > h4:first-child",
      "lvl5": ".doc .sect4 > h5:first-child",
      "lvl6": ".doc .sect5 > h6:first-child",
      "text": ".doc p, .doc dt, .doc td.content, .doc th.tableblock, .doc pre"
    }
  },
  "selectors_exclude": [],
  "min_indexed_level": 1,
  "custom_settings": {
    "advancedSyntax": true,
    "attributesToRetrieve": [
      "anchor",
      "content",
      "hierarchy",
      "url",
      "component",
      "version"
    ],
    "attributesToSnippet": [
      "content:25"
    ],
    "customRanking": [
      "desc(weight.page_rank)",
      "desc(version)",
      "desc(weight.level)",
      "asc(weight.position)"
    ]
  }
}

Any help would be much appreciated.

Thanks

@kranthi You’re doing it correctly. I had the same experience and it eventually started working. Perhaps there’s a caching issue?

@DrDocs Yeah i resolved the issue, the issue is with lvl0 in my config.json, once i adjusted that i was able to get more results and scrolling

@kranthi Can you elaborate? It’s not obvious how lvl0 would impact hitsPerPage.