A quoted title term in a products or productsCount query returns different products depending on which other terms are in the query. The parsed query is the same each time. I’d like to know which behavior is intended.
API version: 2026-07, Admin GraphQL, on a development store.
Setup
The store has 3 products titled exactly “Backpack” and 13 more whose titles contain the word, such as “Summit Trail Backpack in Sand”.
Results
query |
productsCount |
|---|---|
title:"backpack" |
3 |
title:"backpack" AND status:active |
2 |
title:"backpack" AND created_at:>2020-01-01 |
3 |
title:"backpack" AND vendor:* |
3 |
title:"backpack" AND -tag:zzzz |
16 |
title:"backpack" AND tag:* |
16 |
title:"backpack" AND price:>=0 |
16 |
title:"backpack" AND -category_id:* |
9 |
(-category_id:* OR category_id:na) AND (title:"backpack") |
10 |
products returns the same sets as productsCount in every row.
With only status, created_at or vendor beside it, the title term matches the whole title. With a tag, price or category_id term beside it, it matches every title containing the word. No product has the tag zzzz, so -tag:zzzz should not change the result at all, yet the count goes from 3 to 16.
The same happens with vendor:
query |
productsCount |
|---|---|
vendor:"Summit" |
0 |
vendor:"Summit" AND -category_id:* |
38 |
What I ruled out
- Double quotes, single quotes and no quotes give the same counts.
- Capitalisation makes no difference.
- Brackets, term order, and writing
ANDor leaving it implicit make no difference.
Debug output
With the Shopify-Search-Query-Debug: 1 header, the title term parses the same way in both cases.
Alone, returning 3:
{"field":"title","match_phrase":"backpack"}
With the tag term, returning 16:
{"and":[{"field":"title","match_phrase":"backpack"},{"not":{"field":"tag","match_all":"zzzz"}}]}
Why it matters
Our app shows a merchant how many products a filter matches, then lets them act on those products inside a narrower view that adds a category term. The first number comes from the title term alone and the second from the combined query, so a merchant can preview 3 products and then be shown 10.
Questions
-
Which is the intended match for
title:"x": the whole title, or any title containing the phrase? The search syntax page ( Search query syntax ) says tokenized fields match a term “found anywhere in the field”, but theproductsreference does not say whethertitleandvendorare tokenized. -
Is there a supported way to ask for an exact title or vendor match that behaves the same regardless of the other terms?
-
Is the exact match on simple queries something we can rely on, or could it change?
One smaller thing from the same debug output:
-category_id:*parses as{"field":"category_id","exists":true}with nonotaround it, while-tag:zzzzshows anot. The results are correct, so this may only be how the debug output prints it.