Hello, I have a sku that has a hyphen if I try se...
# community-help
s
Hello, I have a sku that has a hyphen if I try searching with out the hyphen and no space it does not come up in the search result. PS: infix is true and I have "-" as a token separator Please see the attached images. Here is my search object:
Copy code
const semanticSearchParams = {
        collection: process.env.NEXT_PUBLIC_TYPESENSE_COLLECTION_NAME,
        q: replaceHyphenWithSpace(query).toLowerCase(), // Ensure this contains the search term
        query_by: 'manufacturerSku, sku, product_name, description',
        infix: 'off, always, off, off',
        query_by_weights: '8, 6, 3, 2', 
        sort_by: '_text_match:desc', 
        vector_query: `embedding:([${queryVector}], k:100, distance_threshold:0.6, alpha:0.7)`,
        exclude_fields: 'embedding',
        group_by: 'parent_id',
        group_limit: 1,
        per_page: 6,
      };
a
Hey @Shmuly Itzkowitz, Can you create a small, reproducible example using the following file? https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b Important things for us to debug this scenario will be your Typesense Version, the collection schema, one or two indexed documents were the issue happens and the query search (your reproducible example will naturally contain all of them). But as a heads-up, you
infix
is only being applied to
sku
. Is the field that contains the hit possibly
man ufacturerSku
?
s
Let me see what if I can replicate this ic-620 is the sku