I'm trying to get make some fields searhcable with collective.dexteritytextindexer. When I look at SearchableText, the title and description are updated but after that says 'none'. ie ['Title','description', 'none']. The plonesite has other content types that do work.
- Plone 5.2.
- Python 3.7.6
I have the content-type class defined in Python, and but the schema model in xml.
profiles/default/types/presentation.xml:
<?xml version="1.0"?>
<object name="presentation" meta_type="Dexterity FTI" i18n:domain="plone"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<property name="title" i18n:translate="">Presentation</property>
<property name="description" i18n:translate="">A conference presentation</property>
<property name="icon_expr">string:${portal_url}/document_icon.png</property>
<property name="link_target"></property>
<property name="immediate_view">view</property>
<property name="global_allow">True</property>
<property name="filter_content_types">True</property>
<property name="allowed_content_types">
<element value="File"/>
<element value="Document"/>
</property>
<property name="allow_discussion">False</property>
<property name="default_view">view</property>
<property name="view_methods">
<element value="view"/>
<!--<element value="album_view"/>-->
<!--<element value="event_listing"/>-->
<!--<element value="full_view"/>-->
<!--<element value="listing_view"/>-->
<!--<element value="summary_view"/>-->
<!--<element value="tabular_view"/>-->
</property>
<property name="default_view_fallback">False</property>
<property name="add_permission">cmf.AddPortalContent</property>
<property name="klass">plone.dexterity.content.Container</property>
<property name="behaviors" purge="False">
<element value="plone.app.event.dx.behaviors.IEventBasic"/>
<element value="plone.app.event.dx.behaviors.IEventLocation"/>
<element value="plone.app.dexterity.behaviors.metadata.IOwnership"/>
<element value="plone.app.dexterity.behaviors.metadata.IPublication"/>
<element value="plone.app.dexterity.behaviors.metadata.ICategorization"/>
<element value="plone.app.content.interfaces.INameFromTitle"/>
<element value="plone.app.relationfield.behavior.IRelatedItems"/>
<element value="plone.app.contenttypes.behaviors.collection.ICollection"/>
<element value="collective.dexteritytextindexer.behavior.IDexterityTextIndexer" />
<element value="plone.constraintypes"/>
<element value="plone.leadimage"/>
</property>
<property name="schema">addon.conferencepolicy.content.presentation.IPresentation</property>
<alias from="(Default)" to="(dynamic view)"/>
<alias from="edit" to="@@edit"/>
<alias from="sharing" to="@@sharing"/>
<alias from="view" to="(selected layout)"/>
<action title="View" action_id="view" category="object" condition_expr=""
description="" icon_expr="" link_target="" url_expr="string:${object_url}"
visible="True">
<permission value="View"/>
</action>
<action title="Edit" action_id="edit" category="object" condition_expr=""
description="" icon_expr="" link_target=""
url_expr="string:${object_url}/edit" visible="True">
<permission value="Modify portal content"/>
</action>
</object>
presentation.py
class IPresentation(model.Schema):
model.load('models/presentation.xml')
models/presentation.xml
<model xmlns:i18n="http://xml.zope.org/namespaces/i18n"
xmlns:security="http://namespaces.plone.org/supermodel/security"
xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"
xmlns:form="http://namespaces.plone.org/supermodel/form"
xmlns:indexer="http://namespaces.plone.org/supermodel/indexer"
xmlns="http://namespaces.plone.org/supermodel/schema">
<schema>
<field name="title" type="zope.schema.TextLine"
indexer:searchable="true">
<description/>
<title>Title</title>
</field>
<field name="description" type="zope.schema.Text"
indexer:searchable="true">
<description/>
<required>False</required>
<title>Summary</title>
</field>
<field name="body" type="plone.app.textfield.RichText"
indexer:searchable="true">
<description/>
<required>False</required>
<title>Body</title>
</field>
<field name="speaker" type="zope.schema.Set">
<description>Speaker</description>
<title>Speaker</title>
<value_type type="zope.schema.Choice">
<source>addon.conferencepolicy.content.vocabularies.persons</source>
</value_type>
</field>
<field name="track" type="zope.schema.Choice">>
<description>Conference Track</description>
<required>False</required>
<title>Track</title>
<vocabulary>addon.vocabularies.tracks</vocabulary>
</field>
<field name="duration" type="zope.schema.Choice">
<description>Duration of presentation</description>
<required>False</required>
<title>Duration</title>
<vocabulary>addon.vocabularies.talk_duration</vocabulary>
</field>
<field name="level" type="zope.schema.Choice">
<description>Target Level</description>
<required>False</required>
<title>Level</title>
<source>addon.conferencepolicy.content.vocabularies.LEVEL_TYPES</source>
</field>
<field name="audience" type="zope.schema.Set">
<description>Target Audience</description>
<required>False</required>
<title>Audience</title>
<value_type type="zope.schema.Choice">
<source>addon.conferencepolicy.content.vocabularies.AUDIENCE_TYPES</source>
</value_type>
</field>
<field name="slides_url" type="zope.schema.TextLine">
<description>URL of slides</description>
<title>Slides</title>
<required>False</required>
</field>
<field name="slides_embed" type="zope.schema.Text">
<description>Embed code for slides</description>
<title>Slides embed code</title>
<required>False</required>
</field>
<field name="video_url" type="zope.schema.TextLine">
<description>URL of video recording</description>
<title>Video</title>
<required>False</required>
</field>
<field name="video_embed" type="zope.schema.Text">
<description>Embed code for video recording</description>
<title>Video embed code</title>
<required>False</required>
</field>
<field name="schedule_url" type="zope.schema.TextLine">
<description>URL of this presentation on the schedule</description>
<title>Schedule</title>
<required>False</required>
</field>
</schema>
</model>