I'm using Low Search to search a business directory where individual businesses are tagged with the Solspace Tag module. The search form has a field for keywords and a drop-down list of tags.

Here's the code I have that's working:


            <label for="keywords">Search by keyword</label>
            <input type="search" name="keywords" value="{low_search_keywords}" />

            <label for="search:vendor_services">I need:</label>
            <select name="search:vendor_services">
              <option{if low_search_search:vendor_services == '{tag}'} selected{/if} value="{tag}">{tag} ({count})</option>

            <button type="submit">GO</button>


But I'm having trouble getting Low Search to search for an exact match in the tags custom field. For instance, if I search for the tag "farm" I get results with the "farmers market" tag as well.

Adding an '=' sign for an exact match like value="={tag}" only matches if that's the only tag.

Reading this post, it sounds like it might not be possible since I'm trying to do an exact match with multiple values.

Is this possible with Low Search? Or should I be using Solspace's Super Search instead since is has a tag parameter specifically for searching tags?

  • 1
    The next version of Low Search, coming next week, will support multiple exact matching like this. Drop me an email at hi at gotolow dot com if you want to give it a go before its official release.
    – Low
    Commented Feb 1, 2013 at 8:57

2 Answers 2


Unfortunately, there's no way to do this with Low Search at this time. I think there are only two solutions to this problem:

  1. Use Solspace Super Search which includes a method for searching tags.
  2. Use categories instead of Solspace Tags since they are queried via their IDs instead of their actual names.

I went for option 2.

The closest thing getting this to work is to search a field using the "\W" trigger at the end of the term.

<select name="search:vendor_services">
  <option value="foo\W">Foo</option>
  <option value="bar\W">Bar</option>


This searches for a full word, not a partial word match. It works the same as the search:field-name parameter in the channel entries tag:


When doing a “Contains” search, ExpressionEngine is literally just looking for matches on the combination of letters given. For instance using “cat” in a “Contains” search would match entries with “cat”, “cats”, “category”, “vocation”, etc. If you need “Contains” matching, but only want entries that include the term as a whole word on its own, you can add the special trigger \W after the term.

The problem with this solution is that Solspace Tags can be multiple words. For instance, searching "farm\W" will find the "farm" tag and ignore a "farmers market" tag, but it would also match a tag like "ant farm" since it also contains a the whole word "farm."

The only way to have this work correctly would be to write an extension for Low Search that searches the tables Solspace Tag creates to store tag data.

  • FYI, I'm working on an extension that will allow for better Low Search / Solspace Tag compatibility. Should be finished this week. I'll announce it on Twitter when it's ready.
    – Low
    Commented Feb 25, 2013 at 9:32
  • Said extension: github.com/lodewijk/low_search_tag
    – Low
    Commented Feb 26, 2013 at 8:06
  • Perfect! Just what I needed!
    – Alex Roper
    Commented Mar 5, 2013 at 10:50

Low just released an add-on to address searching Solspace Tags. It's called Low Search Tag.

I used the following code to solve my problem:

<select name="tag_id:vendor_service_tags[]">
     <option value="{tag_id}"{if tag_id IN ({low_search_tag_id:vendor_service_tags})} selected="selected"{/if}>{tag} ({count})</option>

I also added the require_all="tag_id" parameter to the search form since I have multiple selects for searching multiple tag groups at once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.