Skip to content

filter_by not preserved on search page #54

Open
@darkweaver87

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions