typesense / typesense

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Home Page:https://typesense.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using ticks (`) prevents prefix matching from working

vamshiaruru32 opened this issue · comments

Description

Rrecently upgraded to v26 to try out the prefix filtering feature. But it doesn't seem to work if the value is wrapped with ` in some cases. For example the following works:

curl --location 'http://<url>/collections/product_variants/documents/search?q=*&query_by=searchText0%2CsearchText1%2CsearchText2&per_page=1&filter_by=brandName%20%3A%20KAT*&include_fields=brandName' \
--header 'x-typesense-api-key: <api key>' \
--data ''

with response like

"hits": [
        {
            "document": {
                "brandName": "KATS"
            },
            "highlight": {},
            "highlights": []
        }
    ]

However the following doesn't work:

curl --location 'http://<url>/collections/product_variants/documents/search?q=*&query_by=searchText0%2CsearchText1%2CsearchText2&per_page=1&filter_by=brandName%20%3A%20%60KAT*%60&include_fields=brandName' \
--header 'x-typesense-api-key: <api key>' \

it returns empty response

"hits": [],

Expected Behavior

Prefix matching should work with ticks and return appropriate results

Actual Behavior

Returned results are empty

Metadata

Typesense Version: v26

OS: typesense cloud