How do you list assets with a certain metadata value?

This is so annoying; I feel like I should know the answer to this but can't get my head into gear!


I have heaps of news items, and I want to list only those with a certain metadata value (in this case a ticked box).



How do I do this? Is there some kind of canned search page or asset list or something?

Hi Rachel


Use the search folder and point your asset listing at the search folder. not sure what criteria to use for the tickbox but the search folder is what I use to do this sort of thing. Other than that you could do grouping on the metadata field and somehow hide the unticked group. That is if you can get it to group properly on the field type.



Shane

Asset listing doesn't filter the listed items by metadata, but you can sort.
If you would like to take action on those assets, use trigger/batching, which works for me.

  1. Pass a Search page a predefined value, and make sure it's only checking against the one metadata field so it would be super fast in returning results.

  2. Use asset listing link value filtering instead of metadata. 'Mark' the news items with custom link value (on linking screen) instead of metadata. The asset listing will only show results with matched link values applied.

I'm giving Shane's idea a go first.


Shane, I have my search folder listing the exact assets that I want in my listing, but how do I actually configure my asset list to show the children of the search folder? I can't work out what asset type to list… News item shows no result, and search folder just lists the name of the search folder, not the things it's found.

Hi Rachel


You use the search folder as the root, the asset listing setup should be no different to usual but you might want to check that type 3 links are included and setting direct links might help. What version are you using?



Cheers

Shane

Adding the type 3 links and setting direct links got it going! Yay!


In the meantime I tried passing the search page a predefined value (with it's own field searching nothing else), and that worked, but the Search folder is quicker on the front end so I'll go with that.



Thanks for the super-speedy suggestions everyone!

Super fast and Matrix search do not belong in the same sentence unless you put another search engine in front of super fast.

[quote]
Super fast and Matrix search do not belong in the same sentence unless you put another search engine in front of super fast.

[/quote]



You mean, like Squiz Search (Funnelback)? :smiley:

Yeah, or a google appliance or something else like Solr. Say, states that the suite is open source, if Squiz Search is based on Funnelback how is it going to be OS?

[quote]
…if Squiz Search is based on Funnelback how is it going to be OS?

[/quote]



Funnelback itself is not an open source product. Squiz Search is a product that uses Funnelback to do the indexing and searching, will also provide much more functionality and be using the new Squiz Framework and integrate with the rest of the suite products.



That Squiz Search product is open source. You can't get access to the FB source though. It will come compiled inside Squiz Search and you will have to use it as is, although you wouldn't really want to use the binaries directly anyway.

[quote]
You can't get access to the FB source though. It will come compiled inside Squiz Search

[/quote]



Presumably Squiz Search wont be released as GPL then?

[quote]
Presumably Squiz Search wont be released as GPL then?

[/quote]

Squiz Search is open source and sits on top of Funnelback to provide interfaces and APIs. Funnelback is not and will not ship with source code.

[quote]
Squiz Search is open source and sits on top of Funnelback to provide interfaces and APIs. Funnelback is not and will not ship with source code.

[/quote]



My point was along the lines of combining GPL and non-GPL code, and how permissible this is with the GPL.



The GPL FAQ, gives a helpful summary of the issues.

[quote]
My point was along the lines of combining GPL and non-GPL code, and how permissible this is with the GPL.



The GPL FAQ, gives a helpful summary of the issues.

[/quote]



Funnelback and Squiz Search are completely separate applications written in different languages and in no way linked via source code. Squiz Search executes FB binaries on the server to use some of it’s functionality in the same way Matrix uses FB OEM without it being open source. FB does not have to be open source for Squiz Search to be open source.



EDIT: I see where my original comment was confusing now. FB is not compiled into Squiz Search, as I implied. It is distributed for free in a binary format and the PHP application simply makes use of it like a library.

Hi,


I've been playing with Shane's method of asset listing using search folder to list form submission.



There are couple of problems:


  1. It does not show all form submission.
  2. I can't filter the search results no matter what.



    Is it even possible to filter results for form submission?





    thanks for the help.

One hacky way you can get around this is to use a paint layout to print the asset (from the listing's in the Type Format) and set some conditions in the paint layout so that it doesn't print anything if your keywords/values don't match (you can use any condition normally available in paint layout conditions).


So you'd create a paint layout (asset ID "123"), and in the Type Format of the asset listing put:

    
    %asset_contents_paint_123%


Then in the Conditional Keywords of the paint layout default format, create your conditions (eg. keyword regexp match to check that "%asset_metadata_foo" equals "foo"). Let's say this condition name is "check_foo".

In the paint layout default format, you'd simply do:
    
    %begin_check_foo%
    
    Name: %asset_name%
%end_check_foo%


The result is that if your condition doesn't match, nothing will be printed.

There are a couple of downsides to this:

  • It's not particularly efficient (performance-wise). Each asset matching the listing conditions is still a candidate, and still gets sorted according to the listing settings, etc. so we're not really excluding assets from the listing, we're just hiding anything from being printed.
    [*]Because the asset is still considering to be "included" in the listing (even if it's not printed), pagination will be borked (ie. may display the wrong number of assets per page)

[quote]
Hi,



I've been playing with Shane's method of asset listing using search folder to list form submission.



There are couple of problems:


  1. It does not show all form submission.
  2. I can't filter the search results no matter what.



    Is it even possible to filter results for form submission?





    thanks for the help.

    [/quote]



    I suspect that the search folder is probably not searching against the contents of the submission which may be why you are not having much luck with the results. It should return all of the submissions but I am not surprised that it isn't filtering. If there is a particular field that you wanted to filter on I would play around with a metadata field that gets populated with the field value on submission and then you could filter against that. It won't matter what you try if you are trying to filter form submissions, you will always be playing with hacky ways of achieving your end goal.