I have created a new dexterity type, and the type is working nicely, and title turns up nicely in the Plone search results. However I need to index the rest of the fields aswell.
Following the Dexterity manual I have created an @indexer and catalog, and I can see in portal_catalog that the "varenummer" index is filled with the correct column data.
My problem is though that I cant search on a "Varenummer" in the plone search field.
Any ideas?
I have the following schema set up in vare.py
class IVare(form.Schema):
"""Leverandør type, som kan oprettes alle steder.
"""
title = schema.TextLine(
title=_(u"Varenavn"),
)
varenummer = schema.TextLine(
title=_(u"Varenummer"),
)
stoerrelse = schema.TextLine(
title=_(u"Størrelse"),
)
enhed = schema.TextLine(
title=_(u"Enhed"),
)
pris = schema.TextLine(
title=_(u"Pris"),
)
@indexer(IVare)
def varenummerIndexer(obj):
"""Create a catalogue indexer, registered as an adapter, which can
populate the ``start`` index with the film's start date.
"""
return obj.varenummer
grok.global_adapter(varenummerIndexer, name="varenummer")
In catalog.xml I have defined:
<?xml version="1.0"?>
<object name="portal_catalog" meta_type="Plone Catalog Tool">
<index name="varenummer" meta_type="FieldIndex">
<indexed_attr value="varenummer"/>
</index>
<column value="varenummer"/>
</object>