typesense / docusaurus-theme-search-typesense

A fork of the awesome @docusaurus/theme-search-algolia library customized to work with Typesense
https://typesense.org/docs/guide/docsearch.html
MIT License
67 stars 15 forks source link

filter_by parameter not working #36

Open kijung-iM opened 1 year ago

kijung-iM commented 1 year ago

Description

Hello, filter_by parameter not working on my docusaurus site.

I want to ignore anchor:shorcut-product on search result(See all result page). Even if I set the parameters, the result is the same.

config is follwing:

typesenseSearchParameters: {
  filter_by: 'anchor:!=shortcut-product',
  highlight_affix_num_tokens: 200,
},

refer to the following dataset:

{
  "anchor": "shortcut-product",
  "docusaurus_tag": "docs-default-current",
  "hierarchy": {
    "lvl0": "...",
    "lvl1": "WhaTap Docs",
    "lvl2": null,
    "lvl3": "상품별 문서 바로가기 ​",
    "lvl4": null,
    "lvl5": null,
    "lvl6": null
  },
  "hierarchy.lvl0": "...",
  "hierarchy.lvl1": "WhaTap Docs",
  "hierarchy.lvl3": "상품별 문서 바로가기 ​",
  "hierarchy_camel": [
    {
      "lvl0": "...",
      "lvl1": "WhaTap Docs",
      "lvl2": null,
      "lvl3": "상품별 문서 바로가기 ​",
      "lvl4": null,
      "lvl5": null,
      "lvl6": null
    }
  ],
  "hierarchy_radio": {
    "lvl0": null,
    "lvl1": null,
    "lvl2": null,
    "lvl3": "상품별 문서 바로가기 ​",
    "lvl4": null,
    "lvl5": null,
    "lvl6": null
  },
  "hierarchy_radio_camel": {
    "lvl0": null,
    "lvl1": null,
    "lvl2": null,
    "lvl3": "상품별 문서 바로가기 ​",
    "lvl4": null,
    "lvl5": null,
    "lvl6": null
  },
  "id": "136246",
  "item_priority": 70025,
  "language": "ko",
  "no_variables": true,
  "objectID": "29e9199a93710554195c18c44521599498eddf08",
  "tags": [],
  "type": "lvl3",
  "url": "https://docs.whatap.io/ja/Support-env#shortcut-product",
  "url_without_anchor": "https://docs.whatap.io/ja/Support-env",
  "url_without_variables": "https://docs.whatap.io/ja/Support-env#shortcut-product",
  "version": [
    "current"
  ],
  "weight": {
    "level": 70,
    "page_rank": 0,
    "position": 5,
    "position_descending": 25
  }
}

and url is not exist, why is such a value generated?

Typesense Version: 2.4.1

OS: linux