docsearch-config.json.hbs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {
  2. "index_name": "spring-security-docs",
  3. "start_urls": [
  4. {{#each latestVersions}}
  5. {
  6. "url": "{{{@root.site.url}}}/{{#if (eq ./activeVersionSegment '')}}(?:$|index.html$|[a-z].*){{else}}{{{./activeVersionSegment}}}/{{/if}}",
  7. "extra_attributes": {
  8. "component": "{{#if (eq ./name 'ROOT')}}security{{else}}{{{./name}}}{{/if}}",
  9. "version": "{{{./version}}}",
  10. "version_rank": {{#if (eq ./activeVersionSegment '')}}1{{else}}2{{/if}}
  11. }
  12. }{{#unless @last}},{{/unless}}
  13. {{/each}}
  14. ],
  15. "sitemap_urls": [
  16. "{{{site.url}}}/sitemap.xml"
  17. ],
  18. "scrape_start_urls": true,
  19. "stop_urls": [
  20. {{#each stopPages}}
  21. "{{{@root.site.url}}}{{{./pub.url}}}"{{#unless @last}},{{/unless}}
  22. {{/each}}
  23. ],
  24. "selectors": {
  25. "default": {
  26. "lvl0": {
  27. "global": true,
  28. "selector": ".nav-panel-explore .context .title, .nav-panel-explore .context .version"
  29. },
  30. "lvl1": ".doc > h1.page",
  31. "lvl2": ".doc .sect1 > h2:first-child",
  32. "lvl3": ".doc .sect2 > h3:first-child",
  33. "lvl4": ".doc .sect3 > h4:first-child",
  34. "text": ".doc p, .doc dt, .doc td.content, .doc th.tableblock"
  35. }
  36. },
  37. "selectors_exclude": [
  38. "#section-summary"
  39. ],
  40. "min_indexed_level": 1,
  41. "custom_settings": {
  42. "advancedSyntax": true,
  43. "attributesForFaceting": [
  44. "component",
  45. "version"
  46. ],
  47. "attributesToRetrieve": [
  48. "anchor",
  49. "content",
  50. "hierarchy",
  51. "url",
  52. "component",
  53. "version"
  54. ],
  55. "attributesToSnippet": [
  56. "content:25"
  57. ],
  58. "customRanking": [
  59. "desc(weight.page_rank)",
  60. "asc(version_rank)",
  61. "desc(weight.level)",
  62. "asc(weight.position)"
  63. ]
  64. }
  65. }