--- a/src/pyams_content_es/document.py Wed Jul 11 15:21:02 2018 +0200
+++ b/src/pyams_content_es/document.py Wed Jul 11 15:21:28 2018 +0200
@@ -17,6 +17,7 @@
# import interfaces
from pyams_content.shared.common.interfaces import IWfSharedContent
+from pyams_content.shared.common.interfaces.types import IWfTypedSharedContent
from pyams_content_es.interfaces import IDocumentIndexInfo, IDocumentIndexTarget
from pyams_sequence.interfaces import ISequentialIdInfo
from pyams_workflow.interfaces import IWorkflowState
@@ -70,3 +71,15 @@
ESField('short_name'),
ESField('description'),
ESField('keywords', boost=2.0)))
+
+
+@adapter_config(context=IWfTypedSharedContent, provides=IDocumentIndexInfo)
+def wf_typed_shared_content_index_info(content):
+ return ESMapping(analyzer='content',
+ properties=ESMapping(ESField('internal_id'),
+ ESField('content_type'),
+ ESField('data_type'),
+ ESField('title', boost=3.0),
+ ESField('short_name'),
+ ESField('description'),
+ ESField('keywords', boost=2.0)))