typesense / typesense/docusaurus-theme-search-typesense
filter_by not preserved on search page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 84
- Forks
- 24
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Description
I'm running:
- typesense v27.1
- docusaurus-theme-search-typesense v0.22.0
- docusaurus v3.5.2
My index contains documents with some version tagged v1 and others v2.
I don't want to see my v1 docs when I search (I use it for something else).
I'm using the following config:
typesense: {
// Replace this with the name of your index/collection.
// It should match the "index_name" entry in the scraper's "config.json" file.
typesenseCollectionName: process.env.TYPESENSE_INDEX_NAME,
typesenseServerConfig: {
nodes: [
{
host: process.env.TYPESENSE_HOST,
port: process.env.TYPESENSE_PORT,
protocol: process.env.TYPESENSE_PROTOCOL,
},
],
apiKey: process.env.TYPESENSE_API_KEY,
},
typesenseSearchParameters: {
filter_by: "version:=v2",
},
// Optional
contextualSearch: true,
}
I've a perfectly working sidebar search.
But I see all results v1 + v2 results. I'll like to see only v2 results.
Steps to reproduce
- setup a typesense index
- add documents with version v1 and version v2
Expected Behavior
See consistent results between the search bar and the search page.
Actual Behavior
I see all results, my filter_by parameters not preserved on multi_search query on search page.
Metadata
Typesense Version: v27.1
OS: linux/amd64
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the configured typesenseSearchParameters reach the search page's multi_search query, comparing that path with the working sidebar search. Reproduce with documents tagged v1 and v2 and verify that filter_by version:=v2 is preserved so both interfaces return only v2 results.
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
- 38/100