Using Thesaurus as a dropdown filter in Search


(James Porich) #1

Matrix Version: 5.3.4.0

Hi Squizzers,

Current Scenario:

  • Several Websites
  • Each website has a ‘Research’ section to it, consisting of many Standard Pages dedicated to particular Research areas
  • We have a Thesaurus of all of these ‘particular research areas’
  • Each project (Standard Page) currently makes use of a Related Asset Metadata Field in which users select the appropriate Thesaurus Term to associate that page with. In this way they can select multiple terms, as projects may deal with many areas. This is the intended solution to our “tagging” of items
  • I wish to make a Search Page allowing for users to search for research of a particular nature by selecting a relevant research area from a dropdown menu.

Issues:

  • I’m finding it difficult using a Search Page to include a dropdown which is built using my Thesaurus Terms which would match any page containing that Thesaurus Term in it’s Related Asset Metadata Field.
  • Most resources I’ve looked at thus far suggest implementing these tagging terms as metadata fields, adn I absolutely agree that this would be my preferred method (as they seem a bit more robust in the context of tagging from what I’ve seen?) however, coming on to this project, the several hundred pages have already been set up in the manner of Thesaurus Terms for tagging :frowning:
  • Bit confused as it seems like I want a “Category” to my Search Page sorted by the particular terms, however as far as I can see this only allows for the variation of a rootnode to point to? Considering that different projects can share a particular Research area across many different_Websites_ , a dynamic rootnode doesn’t seem to help

Desired Outcomes:

  • If this issue has been covered elsewhere, and can be definitively done or not
  • If have to switch to metadata if that is the only solution - it would however be an obvious hassle though and avoided if possible. :frowning: It seems to me as though the Thesaurus has been set up that this functionality should be possible (“search by anything falling under this Synonym”?)

Thanks for any assistance y’all can give :slight_smile:


(Bart Banda) #2

Hey James,
Thanks for the clear explanation.

Usually when you use metadata and thesaurus terms you assign terms (tags) via the thesaurus metadata field. The reason for that is that what gets stored in the metadata value is the actual text value of the term. Where as with metadata related fields you only store the asset ID of the asset you are picking.

So I assume your metadata values stored against your metadata related field looks something like:
“1234:1,1234:2,1234:3” etc?

If that’s the case the Search Page would then need to search on those exact terms because that’s what actually gets index by the Matrix search engine.

As I see it, your best 2 options are to either:

  1. Change metadata field type to a thesaurus type field
  2. Keep your related metadata field, and instead of using thesaurus terms to pick from you pick something like a data record instead, so that what gets stored are full asset IDs that you can still do searches on.

You could try and do a manual search for an Asset ID with a colon in it to see if it gets picked up correctly by the search or not, but I’m not sure if that will work.

The other option is to keep what you got and create another text metadata field that references your current one, so basically prints the same value, but use a keyword modifier on it so that it replaces the colons with a different character, something like:

%metadata_field_existingRelatedField^replace:::_%

Note that escaping colons in keyword modifiers was only recently added in 5.3.

Hope that helps?


(James Porich) #3

Hi Bart,

Cheers for the explanation, that all seems to make sense (definitely get what you mean as far as the correct metadata field returning a string vs. an asset anyway, that was one of the issues I was having) - I’ll give this a go this week :slight_smile: