Using the docusaurus integration, how can I priori...
# community-help
a
Using the docusaurus integration, how can I prioritise exact matches to show up before other matches? For example, in this screenshot, I'd like
Team
to show up before
Team Collaborator
.
My config
Copy code
"start_urls": [
    {
      "url": "<https://clerky-guides-temp.netlify.app/glossary/>",
      "selectors_key": "glossary_selector",
      "page_rank": 5000000
    },
    {
      "url": "<https://clerky-guides-temp.netlify.app/>",
      "page_rank": 1
    }
  ],
  "sitemap_urls": [
    "<https://clerky-guides-temp.netlify.app/sitemap.xml>"
  ],
  "sitemap_alternate_links": true,
  "end_urls": [
    ""
  ],
  "selectors": {
    "default": {
      "lvl0": {
        "selector": "invalid",
        "default_value": "Documentation"
      },
      "lvl1": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[1]",
        "type": "xpath"
      },
      "lvl2": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[2]",
        "type": "xpath"
      },
      "lvl3": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[3]",
        "type": "xpath"
      },
      "lvl4": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[4]",
        "type": "xpath"
      },
      "lvl5": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[5]",
        "type": "xpath"
      },
      "lvl6": {
        "selector": "(//a[contains(@class, 'menu__link--active')])[6]",
        "type": "xpath"
      },
      "text": "article p, article li, article td:last-child"
    },
    "glossary_selector": {
      "lvl0": {
        "selector": "h4"
      },
      "text": "article p, article td:last-child"
    }
j
Could you open the network inspector in the dev console, look for this network request, right-click, copy-as-curl and post it here? Could you then click on the preview tab, click on the output and post it here?
a
Copy code
curl '<https://msnl801pkywadxibp-1.a1.typesense.net/multi_search?x-typesense-api-key=rYIXfqb14zL4DRhQoPnQ2RAhROOFwbd0>' \
  -H 'authority: <http://msnl801pkywadxibp-1.a1.typesense.net|msnl801pkywadxibp-1.a1.typesense.net>' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-US,en;q=0.9,fr;q=0.8,da;q=0.7' \
  -H 'content-type: text/plain' \
  -H 'origin: <https://deploy-preview-128--clerky-guides-temp.netlify.app>' \
  -H 'referer: <https://deploy-preview-128--clerky-guides-temp.netlify.app/>' \
  -H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
  --data-raw '{"searches":[{"collection":"clerky-typesense-search","q":"team","query_by":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","include_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content,anchor,url,type,id","highlight_full_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","group_by":"url","group_limit":3,"filter_by":"language:=en && docusaurus_tag:=[default,docs-default-current]"}]}' \
  --compressed
response
@Jason Bosco any update on this?
j
Hmm, this almost looks like a bug. We’re going to take a closer look and keep you posted in a few days.
@Abhishek Raj Could you upgrade to
0.10.0-1
of
docusaurus-theme-search-typesense
and let me know how it goes? I’ve merged your PR to fix the blank results issue, and I’ve also fixed the ranking issue you pointed out above
a
I still don't see this fixed.
j
Hmm, could you share the curl command from the network inspector in the browser for that search?