Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
modeler
README.md
comments.png

README.md

Comment Indexing

comments

Description

This module enables you to index the document comments.

Usage

Comment a document and search for the comment author and the comment content.

Installation

Studio Modeler

  • Create a schema called commentsforindex, with cfi as prefix.
    • Create the comments property, of type Complex, set as multi-valued:
      • Create a sub-field called user of type User / Group, with restriction to get only users
      • Create a sub-field called comment of type String
  • Add the schema to the document type which comments should be indexed
  • Declare a new core event in Settings > Registries > Core Events with the following code:
{
  "events": {
    "commentAdded": "Comment Added",
    "commentRemoved": "Comment Removed"
  }
}
  • Create an automation scripting called AS_Comment_AddedOrRemoved with the content of Comment_AddedOrRemoved.js (input: void, output: void).
  • Add the EH_AS_Comment_AddedOrRemoved event handler to execute the automation scripting when a comment is added or removed:
    • Events: Comment Added and Comment Removed
    • No specific filters
    • Associated chain or script: javascript.AS_Comment_AddedOrRemoved
  • Create a page provider to search for the cfi:user and cfi:comment property.

Studio Designer

Create a search form, a result layout and a drawer item to display the search within Nuxeo Web UI.

Issues and Limitations

It would be nice to update the Elasticsearch mapping to perform fulltext search on the comment content.

Documentation Links

You can’t perform that action at this time.