typesense / typesense/docusaurus-theme-search-typesense

filter_by parameter not working

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
84
Forks
24
Avg merge
1m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Docusaurus search configuration entry point that consumes typesenseSearchParameters, then trace how filter_by and generated anchor records are passed to Typesense. Reproduce the supplied filter and dataset; done when the shortcut-product record is excluded from all-results searches and the source of the generated anchor is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.