I am creating a search for ecommerce using Typesen...
# community-help
s
I am creating a search for ecommerce using Typesense and I am coming across the following issue. Can anyone help? When I add brand facets to a query I am getting more brands then visible in the search results. This is my query
Copy code
const semanticSearchParams = {
        collection: 'products',
        q: 'sku, product_name, description', // Use the search term from the search bar
        query_by: 'sku,product_name,description',
        query_by_weights: '8,4,2', // Prioritize product_name over SKU and description
        prioritize_exact_match: true,
        prefix: true, // Enables partial matching
        drop_tokens_threshold: 1, // Allows partial word matches
        sort_by: sort_by_value, // Ensures keyword matches come first
        vector_query: `embedding:([${queryVector}], k:100, distance_threshold:0.6, alpha:0.7)`,
        exclude_fields: 'embedding',
        max_facet_values: 200,
        facet_return_parent: 'collections.id, brand.id',
        facet_by: 'collections.id, brand.id',
        group_by: 'parent_id',
        group_limit: 1,
        page,
        per_page: perPage, // Default to 6 results per page if not provided
        filter_by: filterQuery,
      };
j
Almost seems like a bug, but could you help replicate this on a minimal dataset like this, using a set of curl commands: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b And then open a GitHub issue?
s
I just figured this out, it was do to one of my devs creating two separate calls to the Typsense server that were not aligned! So sorry!!
👍 1