TNT Search results - how to keep them narrow

I’ve added TNTSearch to the site I’m developing at the moment but I’m getting a strange request from the client - and I’m not sure I agree/understand but here goes:

At the moment if I search for “Chanel” (it’s vintage designer stuff) I’ll get everything with “Chanel” in the title, content or page header. If I search for “Chanel Bag” and I only have 3 bags, I’ll get those three bags in the first three positions, then I’ll get items that are Chanel, but not bags, and then bags that are not Chanel.

This makes sense to me - but the client would like the results to include ONLY “Chanel Bags” - nothing else. Is this possible?

@dan-james, If I understand correctly, they see everything matching ‘Chanel Bag’ + everything matching ‘Chanel’ + everything matching ‘Bag’? Right?

Isn’t that what everybody expects to get when using Google?

Google provides exact match using quotes. I’ve tried enclosing the search term in quotes on a demo site of TNTSearch itself, but it seems it doesn’t give an exact match as Google does.

That’s what I’d expect too. But they’re expecting behaviour like on shopify sites.

The example I’ve been pointed at is:

But I can’t replicate it.



@dan-james, What happens when you set the fuzzy option to false>

From the TNTSearch plugin:

fuzzy - matches if the words are ‘close’ but not necessarily exact matches

I’ve now tried with fuzzy set to false,
phrase matches on or off and it always returns

"everything matching ‘Chanel Bag’ + everything matching ‘Chanel’ + everything matching ‘Bag’?” as you said.

It’s also the behaviour I would expect - not sure what to do on this one.



@dan-james, If the platform being used cannot provide the requirements of the client (or you just don’t know how), just say so…

There is no single platform that meets all requirement of the client without making compromises on price, functionality or project duration. And some compromises may be a disappointment…

Your solution might not provide their idealized search engine, but does meet other requirements.

Search engine alternatives:
If search is a hard requirement, something else has to give, like price. There are search engines specifically targeting ecommerce sites. is one of them and also targets the shortcomings of Shopify’s search engine. It provides a PHP Search API and Management API you should be able to integrate in the site.

The compromise? It comes with a price and extra labour on your part…

Thanks for these suggestions. I originally proposed using GRAV + Snipcart as I like the speed of flat-file, I like de-coupling the e-commerce section from the front-end and it’s very easy to move servers, pause the whole enterprise, slim down or ramp up when needed.

I now think they may well be more comfortable with Shopify - I’ve told them I’ll help them set up a theme if they choose it. Some jobs just don’t go the way you thought…

Hi @pamtbaau, thought you’d like to know it’s boolean. I set that as the default and know the search works as expected.

“Chanel Black Bags” now only returns “Chanel Black Bags”.

@dan-james, What part of true and false in the docs didn’t you understand…? :wink:

fuzzy: false
phrases: true

Btw. Still going for Shopify?

I feel a bit foolish. But, to be fair, I had fuzzy set to false and phrases set to true. It was this fellow that made the difference:

Screen Shot 2020-08-09 at 14.35.28

I think we’ll avoid shopify - I’d certainly prefer to…