Covering Attributes under tf:containsText

Using Tamino 4.2.1

I have full text indexing enabled on a node in my Tamino database collection. I notice that despite enabling full-text search, I cannot search on the attributes in the elements below the indexed node.

What I would like to do is when I use a fuction line tf:containsText() function, I would also like to include the Attribute values in the search.

What is the easiest way to do that?

Thanks

Hi,

The attributes values are excluded from the full text search on elements by purpose. This is due to the fact that the full text search is performed on the string values of a node and an attribute value does not belong to the string value of the parent element. In order to check the containment of a string in attribute values you have to walk through all attributes and check their values. This can be done by a using a path expression that looks like:

input()/doct-type[@*[tf:containsText(.,?xyz?)]]

The problem is to define the required indexes, because you have to define a text index on every attribute you want to query. It might be helpful to use a multi path index.

Best regards,

Thorsten