Search approach question

New Member
5 0 0

Hi, I'm a bit of a n00b on all the intricacies of Shopify, but catching on quickly.  I'm a LONG time programmer and had a Shopify store back in 2017, but didn't have to do much behind the scenes.  I'm currently creating a new store for a client/friend where organizing and search capabilities trump everything else (for small auto parts).

The approach I settled on uses collections (and filtered collections) where the collections have a LOT of tags, but the products only have just enough to put them into all the collections they need to be in.

I'm obviously trying to avoid adding 30 tags to every product if possible.

However, when a search is performed that includes a tag on a collection that isn't on a product, no results are found.  I searched here and saw one article where it stated that collections were excluded from search results on purpose.  Maybe that was in reference to a different aspect, but here's an example of what I'd like to see:

(Auto) Collection:  Blue

Tags:  blue, aqua, sky, teal, navy, royal


Product:  Widget

Tag: blue

(This should put the product Widget into the Blue collection.)


When someone searches for "Aqua" from the Home page, I'd like to see all the products in the Blue collection appear in the search results.  Currently, this is not happening.


I see this code in search.liquid:

			<div class="button_filters">
					<li {% unless canonical_url contains 'type' %}class="active"{% endunless %}><a href="/search?q={{ search.terms }}">{{ '' | t }}</a></li>
					<li {% if canonical_url contains 'type=article' %}class="active"{% endif %}><a href="/search?type=article&q={{ search.terms }}">{{ '' | t }}</a></li>
					<li {% if canonical_url contains 'type=page' %}class="active"{% endif %}><a href="/search?type=page&q={{ search.terms }}">{{ '' | t }}</a></li>
					<li {% if canonical_url contains 'type=product' %}class="active"{% endif %}><a href="/search?type=product&q={{ search.terms }}">{{ '' | t }}</a></li>


Does this need another section for collections?  Or is this just processing search results generated elsewhere?

Is what I'd like to do even something that's (fairly) easy to do?  The very nature of his business makes it hard to search correctly (always has, I created four of his prior five websites over the last 12 years).  Organizing is always a bear too.  Most of his products tend to belong to three categories such that you can get to a single part by going A > B > C or A > C > B or B > A > C or B > C > A (etc.!).  Because of this and a lot of confusion on the search terms (Is it a retainer? Is it a fastener?  Is it a clip?  Etc.), having a really good search is essential.


Thanks for your advice!


Craig B.

New Member
5 0 0

It's been a few days and I still have this question, so consider this a bump I guess!

Note that for at least one collection, there are actually over 130 tags which would really be a ton to have to add to each product inside that collection!  I've tried adding these into the collection description, but that not only doesn't solve the problem (being found during a search), it looks horrible on the page.

Still looking for an alternative method!


Craig B.