Fuzzy matching when querying for products by tag

Highlighted
New Member
3 0 0

Hi,

 

I am trying to query for a list of products via the GraphQL API by specifying a tag in my query. My query is as follows:

 

{
    products(reverse:false, first:20, sortKey:RELEVANCE, query:"tag:black") {
        pageInfo {
            hasNextPage
        }
        edges {
            cursor
            node {
                id
            }
        }
    }
}

This query returns products with the tag "black" attached to them however it also return products that have a tag which contains the word black e.g. "black-cat" or "new-black".

 

Is it possible to write the query so that it only returns products which have the tag black only and thus ignoring products that have tags that contain the word black.

 

Thanks,

 

Josh

0 Likes