Filtering Collections by custom field

Hi to all,

I have some models defined by dexterity and python schemas, and all of them has the same SimpleVocabulary field. I need to create a collection which filter by the option choosen in each content.

In example:

Content A --> Option A
Content B --> Option B
Content C --> Option A
Content D --> Option A

Collection filtering by "Option A" returns Content A, Content C and Content D
Collection filtering by "Option B" returns Content B

I've readed the doc and training but i don't know if i'm in the right way. I've added one new Index in portal_catalog, and i see rightly the Objects indexed and Distinct values in this. But now, how i add this "filter" in the filter criteria (Text, Dates and Metadata fields) when you add a new Collection?

Thanks in advance and regards

Hi, have you read this?

Hi @cekk, thanks for the reply!

Yes, i've readed and trying to get in work but it's not success. There is some more deep document about this?
I configure the registry like this:

<?xml version="1.0"?>
<registry>
  <records interface="plone.app.querystring.interfaces.IQueryField"
           prefix="plone.app.querystring.field.NAME_OF_MY_FIELD">
    <value key="title">NAME_OF_MY_FIELD</value>
    <value key="description">DESCRIPTION OF MY FIELD</value>
    <value key="enabled">True</value>
    <value key="sortable">False</value>
    <value key="operations">
        <element>plone.app.querystring.operation.string.is</element>
    </value>
    <value key="group">Metadata</value>
  </records>
</registry>

NAME_OF_MY_FIELD is the same as i created in the portal catalog indexes and it's working.

And what's your problem? You still don't see it in collection's criteria list? Even after reinstalling the product (or only registry)?
Configuration seems ok.

Here is a working example

Hi @cekk, i think the configuration is ok too, but i can't see it in the collection's criteria list. I reinstalled my addon, which import my custom contents type by dexterity. This is ok or i have to do something else?

I'll check the example code again.

Thanks in advance and regards

You need to reinstall (or rerun that import step) if you did not do that

Hi @espenmn,

Yes, i rerun the import step like i say before... I'm going to check if there is another error or some conf, cache...

Thanks and regards

What was the solution? I am experiencing the same issue in Plone 5.2

Plone Foundation Code of Conduct