Dynamic asset selection being ignored in search page listing


#1

I’ve created a search page that receives a list of asset ID’s dynamically based on some SSJS I’ve put together.

I’ve managed to get this to work perfectly in a generic asset listing.

However the search page listing seems to completely ignore the dynamic asset selection option. I have “If asset selection not specified” set to “Return empty result” and it still returns all the results of the static root node. I could write gibberish in the ‘Set Value’ input and it would still return all results.

I’m not sure whether the metadata filters I have created along with the stored search queries are overriding the dynamic parameters or something? Have been unable to find any documentation on it. I’ve made sure “Allow Empty Searches?” is turned off.

Does anyone have any insight on dynamic asset selections in search page listings and why it would be working perfectly fine in a generic asset listing?

Thanks.


(Bart Banda) #2

Is the problem that the wrong root node is getting returned? Or that all possible assets without any search filtering is getting retured?

Can you share your search fields screen config and details screen config?


#3

Hi Bart,

I’ve gone ahead and created a separate search page asset for testing purposes. It has a singular search field called ‘name’.

I’ve set the root node to the parent of the items I am trying to list.
I’ve selected ‘Array of specific asset IDs’ as the dynamic parameter with a ‘Set Value’ of 901441,903718,904183,904199
If asset selection is not specified it should return an empty result.

After doing this I go to the front-end and type in the name of a search item that is not in that list of asset id’s and it still shows up.

I managed to find a workaround to this late last night which involves selecting ‘Replacement root node for the listing’ as a dynamic parameter with the set value of the same asset id’s and it’s works as you’d expect (I can’t imagine this is the appropriate way to approach the problem though).

Hope that helps.

Edit: I should mention I’m on v5.5.2.0


(Bart Banda) #4

If you are using ‘Array of specific asset IDs’ as the dynamic parameter with a ‘Set Value’, you will always get the same result regardless of search term entered, as you are specifically specifying which asset IDs to return.

If you simply want to have dynamic Root Nodes, you need to use the ‘Replacement Root node for the listing’ option.


#5

Hi Bart,

“If you are using ‘Array of specific asset IDs’ as the dynamic parameter with a ‘Set Value’, you will always get the same result regardless of search term entered, as you are specifically specifying which asset IDs to return.”

What you’ve said here makes sense to me however please refer to this from above:

“After doing this I go to the front-end and type in the name of a search item that is not in that list of asset id’s and it still shows up.”

Should an item that is not in the set value list of asset ID’s still be able to appear in the search results at all? Because that’s what’s occurring for me when I use ‘Array of specific asset IDs’.

Having to use dynamic root nodes which would search through each root node and their children seems excessive to me when I only want to search through a specific array of asset ID’s.


(Jsisk) #6

Hi Riley,

Not sure about the Searching by name and other items appearing, but perhaps you could link only the required assets into a another folder somewhere, and then set that as the Root Node, thus reducing the search scope considerably.

Would that work?


(Bart Banda) #7

No, I don’t think so, so there may be another setting at play here.

How many assets do you want to search throughout? Maybe it’d be easier to simply asset list them and do the search filtering with JS either sever or client side?