When you link an asset in two or more places, which instance of the asset does the search find? It doesn't seem to find all the instances.
For example: If I have a form about travel that I have linked in a travel section and the forms section, which instance of that asset will display in the search results?
Every instance of the asset that is found under the search root should be returned.
I've just tested this, and I can only get our search to find the most recently created "link" of the asset. The original version doesn't show up in the search results.
What might cause this to happen?
Actually, only one instance is returned for the asset because the two assets are actually the same. The search will only return a list of unique assets that are matched, it doesnt look at lineages at all.
The lineage that is displayed using that keyword in the search results will just be one of them. I have no idea which one will be returned as there is no real logic behind that. If anything, it may try and find the one closest to the current search page.
I've just looked into this a little further and noticed that the asset lineage for the instance of the linked asset that is found by search is really bizarre.
Lets say the first instance has a physical path of Root > A > B > C, and the second instance has a physical path of Root > D > E > F.
The instance of the asset that is displayed in the search has a weird compound asset lineage of Root > A > B > C > D > E > F - a path which doesn't actually exist!
Should I log this as a bug?
[quote]I have no idea which one will be returned as there is no real logic behind that. If anything, it may try and find the one closest to the current search page.[/quote]
Why I'm interested in all of this is that we display asset lineage in our search results. It's great, as it adds a lot of context to each result. However, where we have a set of assets, such as forms, that may be linked in one or more places, I'd like to think that the asset lineage is consistent (so that if these assets are first published in the forms section and linked to other sections later, that the forms path is the one that displays in the search results). But, what I'm finding is that what comes up in the search is actually pretty random. Having played with it, my suspicion is that it finds the instance of the asset that is closest to the search asset's root node. Could this be right?
What keyword on a search results page do you use to display the asset lineage? Sounds like a good idea for adding context.
Cheers
Dale
I think those keywords are %asset_lineage% and %asset_lineage_linked% if you want each parent in the lineage to be a link.
As for the weird lineage in the form: Root > A > B > C > D > E > F
That sounds like a bug. Only one lineage shoud be returned.
Finally, the concept of keeping the "first linked" location to display is not a concept that Matrix uses at all. If an asset is linked in multiple locations, there is no "primary" or "first" link. All links are treated equally and the context of where you are viewing them determines how they are displayed.
It is important to understand that Matrix will not differentiate between a first and second/third etc link location. As far as it is concerned, they are just links.
excellent thanks! It's workign a treat.